Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to return the autoinc field when inserted in SQL ser
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01120919
Message ID:
01121140
Views:
9
>Rajesh,
>
>You should use scope_identity() instead of @@identity.
>
>>How to return the autoinc field from sql server.
>>I think the @@identity should do the work but am confused with the insertrefreshcmd.

I am not sure SCOPE_IDENTITY() will works, becuase when you refresh CA you already are out of scope :o)
I saw in SQL Profiler that INSERT command and Refresh command are in two different Batches (tested with ODBC connection not with ADO). He must use IDENT_CURRENT('Table_name') if He use SQL Server 2005. But I think @@IDENTITY should work :o)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform