Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLServer- Identifier/ AutoInc value and CA
Message
From
01/06/2007 11:41:41
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01229802
Message ID:
01229820
Views:
11
>>SQL Server 2005.
>>I have Integer Identifier column as primary key. Using CA class for Inserts & Updates.
>>
>>How do I get the new ID created in SQl Server in my VFP Cursor?
>>
>>The prob is similar to the VFP problem discussed in Thread #1191628 and solved in Message #1191764.
>
>Found this article http://sqlservercode.blogspot.com/2006/10/hello-output-see-you-later-trigger-or.html

Nice to have feature, but the CA won't use the Output from the Output clause anywhere.

The equivalent to
InsertCmdRefreshCmd = "SELECT Id FROM Table1 WHERE Id = GETAUTOINCVALUE(0)"

to a CA connected to SQL Server 2000 or higher should be
InsertCmdRefreshCmd = "SELECT Id FROM Table1 WHERE Id = IDENT_CURRENT('Table1')"

Bye, Olaf.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform