On Sat, 22 Oct 2011, Felipe Monteiro de Carvalho wrote:

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 =(

Use a TSQLQuery with SQL "select scope_identity() as theid" and read field 0.

I repeat, do not use ExecuteDirect.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to