Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO to cursoradapter - multiple result sets
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01146187
Message ID:
01146717
Views:
22
I tried your code and that worked fine.

When executing my stored proc, after the ors1.open(...), CursorFill returned .F. and the error indicated the ADO recordset was not opened.

Apparently when executing my stored procedure ors1 is not positioned on the first actual recordset. By doing ors1=ors1.nextrecordset and then doing the cursorfill I now get a cursoradapter with the data from the first result set..(??).

Progress!!

>Hi William,
>
>CursorFill() method doesn't report any errors. If it fails it returns .F., you can use AERROR() function to retrieve the error information.
>
>What do CursorFill() and AERROR() return for you?
>
>For me, the following code displays one result after the other as expected (VFP9 SP1, Sql Server 2005):
>
>ors1=CREATEOBJECT("ADODB.Recordset")
>ors1.open("select top 20 * from master..sysprocesses; "+;
>         "select top 20 * from master..sysobjects",;
>         "Provider=SQLOLEDB.1;Integrated Security=SSPI;"+;
>         "Persist Security Info=False;Initial Catalog=master;"+;
>         "Data Source=(local)",3,1)
>
>oca2=CREATEOBJECT("cursoradapter")
>oca2.Alias = "myalias"
>oca2.DataSourceType = "ADO"
>oca2.CursorFill(,,,ors1)
>BROWSE
>
>ors1=ors1.NextRecordset()
>oca2.CursorFill(,,,ors1)
>BROWSE
>
>
>Thanks,
>Aleksey.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform