Hi,
I have written a class based on the session object that is used to access VFP and SQL Server data (using SPT). It works very well except when I want to access a results cursor returned from a SELECT statement. I need to get access to the datasession of the object in order to view the cursors that get returned from SQLExecute(). Below is an example of the code i am using to get the data:
o = CreateObject("emssqlclass.emssql")
o.SQLConnectionString = "uid=xxx;pwd=xxx;Server=xxx;Driver={SQL Server};Database=CRM"
If o.SQLConnect(.T.)
? "Connected"
o.ExecuteSQL("SELECT * FROM dbo.Company","curtest")
o.SQLDisconnect()
EndIf
Release o
Now this should create a cursor called "curtest" which i can access. If I change the class to a custom object I can access the cursor fine.
Is there any way I can set the datasession to that of the object in order to access the cursor?
Regards
Chris
I have written a class based on the session object that is used to access VFP and SQL Server data (using SPT). It works very well except when I want to access a results cursor returned from a SELECT statement. I need to get access to the datasession of the object in order to view the cursors that get returned from SQLExecute(). Below is an example of the code i am using to get the data:
o = CreateObject("emssqlclass.emssql")
o.SQLConnectionString = "uid=xxx;pwd=xxx;Server=xxx;Driver={SQL Server};Database=CRM"
If o.SQLConnect(.T.)
? "Connected"
o.ExecuteSQL("SELECT * FROM dbo.Company","curtest")
o.SQLDisconnect()
EndIf
Release o
Now this should create a cursor called "curtest" which i can access. If I change the class to a custom object I can access the cursor fine.
Is there any way I can set the datasession to that of the object in order to access the cursor?
Regards
Chris