Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return from Sql to VFP?

Status
Not open for further replies.

rabbit75

Programmer
Aug 15, 2002
30
I hope this question was not posed before, I looked but didn't see anything like it.

I have a app using SQL Server 2000 for the database and VFP. There is a field, transaction, which is an identity field in SQL. Is there any way in VFP, when after inserting a new record (using sqlprepare, etc. and a stored procedure) to return that transaction number to VFP from SQL?

Hope this is clear.

Thanks
 
NO, you need to run another SQL to the server to retrive it. SQLexecute has no way of returning info othere then error or success operation. Now, if you are calling a stored procedure to do this insert, why not modify the stored procedure to write some sort of data out to a specific location that you could check on. Attitude is Everything
 
Thanks

Found this to use too: SELECT IDENT_CURRENT(table)
which returns the identity (transaction number) of the record just added. Added it to the end of the stored procedure and the cursor is returned to vfp.
 
IDENT_CURRENT, is this a SQL Server 2000 property, stored procedure? Attitude is Everything
 
IDENT_CURRENT is a SQL SERVER property.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top