Hello, Ok, searching some more I see that "select scope_identity()" could return the generated primary key. But how to get the value? DBComm.PQConnection.ExecuteDirect(SQLText); The method above has no return value =( -- Felipe Monteiro de Carvalho