Klaus,

Thanks for your reply, however I don't seem to get it right. Is it a Witango
variable of the system scope or user scope or ... you're talking about? For
me all of them are empty. Or should I run a direct Database SELECT command?
I would prefer not to have to run a query just to find a key, but then
again, it's better than nothing. Would you please elaborate a little more...

Dan

> 
> Dan,
> 
> SELECT @@IDENTITY
> 
> right after the insert does it for MS and Sybase SQL Server. But watch out
> for threading problems: @@IDENTITY is a system variable that always holds the
> value of the last auto-increment regardless of the table.
> 
> Klaus
> 
> On Wednesday 01 May 2002 03:21, Dan wrote:
>> Hi,
>> 
>> I've recently moved from FileMaker Mac to MSSQL PC.
>> I have an "Identify" field in my tables (the database automatically
>> generates the value for the keys). In Tango for FileMaker I used to receive
>> the record nr after the insert in the resultset so I could use it when
>> needed to insert it into a related table. How do I do the equivalent in
>> SQL? Thanks,
>> Dan.
>> 
>> ________________________________________________________________________
>> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>> with unsubscribe witango-talk in the message body
> 

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

Reply via email to