Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Capturing the output clause
Message
From
11/08/2009 13:09:10
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Capturing the output clause
Environment versions
Visual FoxPro:
VFP 9
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01417348
Message ID:
01417348
Views:
125
SQL Server has a 'nifty' output clause, however, I can't figure out how to capture the return value when using SQLExec. If my sql command is of the form "insert into tablename (code) output inserted.PrimaryKeyName values ('XXX')" and I run it in SQL Server management Studio it returns the primary key value on the screen. However, if I run the same command with SQLExec it only returns a negative number if not successful and a positive number indicating the number of records affected if successful. In VFP code how do I capture the 'inserted.PrimaryKeyName value'? Thanks!
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Next
Reply
Map
View

Click here to load this message in the networking platform