I am not sure how widely suported this is, or if it is standard SQL or not.  
It works in R:tango and I am sure it will vary from DB to DB.

Do a direct dbms action doing your insert, and then do another direct dbms 
action selecting the row with count = insert.

INSERT INTO mytable (col1, col2) VALUES ('XXX','YYY')
The table mytable has an auto numbered field on it called MYIDCOL.  Then:

SELECT myidcol FROM mytable WHERE COUNT = INSERT

Troy Sosamon

-------- Original Message

I am currently using a Direct DBMS action in wTango that calls a stored 
procedure to insert a record and then return the new identity of that field, 
it seems that works better than a insert then search action to get the 
identity field.  I was wondering if 5.0 or later will have the ability to 
grab this field on insert, or if anybody has a less tedious way of doing 
this...
 
Brad

 

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to