Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Capturing the output clause
Message
From
11/08/2009 14:41:05
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
 
 
To
11/08/2009 14:17:53
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01417348
Message ID:
01417377
Views:
43
I got the thing to work. It may not be the cleanest but it will suit my needs at this point. Basically what I am doing is including the statement "Output inserted.InvRecordNO" in the SQL. If the SQL succeeds then I call "=SQLEXEC(dbHandle,"Select * from inserted") " and then r=VAL(sqlresult.invRecordNo)" . This returns the new primary key to me. I hate to hit the database twice and think it very strange that SQL Server would return the integer invRecordNo as a character string.

Thank you all for your help!
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform