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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I return a resultset(cursor)

Status
Not open for further replies.

rombout

Programmer
Jan 24, 2000
24
NL
How do I return a resultset(cursor) from an automation server(dll) made in Fox Pro. I call the dll with the createobject funtion. In the dll I retrieve the data from an SQL server database with SQL-pass through. There was data retrieved and a cursor created in the dll but when I am out the dll method I cant't find the cursor in any workarea.

Thanks and Greetings Rombout
 
Since the .dll is essentially another instance of a VFP app running, you would need to make the data available just as if you had VFP running twice with separate data sessions etc., like copying the file to an available table, or passing the reference to the temp table back.

Dave S.
 
How do I pass the reference to the temp table back. How does this reference look.

Thanks Rombout
 
After running the query, you could either do a COPY TO ... to a file that the app will know the name of, or send back the name of the cursor using something like:

SQLEXEC(handle, 'SELECT * FROM SomeTable', 'MyCursor')
STORE DBF('MyCursor') TO QryName

Then send back "QryName".

Dave S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top