Troy, 

This will not always work in R:Tango like it does in multi-user LAN-
style R:Base. The only database "user" to Witango is the network id 
name set in the oterro.cfg file, and all users will get the same user 
name and hence potentially the same insert value. So for two near 
simultaneous inserts, the first inserter may get the row id from the 
second inserter.

I stamp each inserted row with a userid (or userreference), and 
immediately do a direct dbms that looks up max (rowid) where userid = 
whatever.

Bill



On Wed, 1 May 2002 12:09:05 -0600, Troy Sosamon wrote:

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




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

Reply via email to