Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Who really uses the VFPOleDB.1 provider?
Message
From
04/10/2006 19:27:04
 
 
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01158763
Message ID:
01159555
Views:
22
>PMJI. This might be an interesting test with the VFPOLEDB provider. Basically, in the SPROC, you'd just change your SELECT to an 'INTO CURSOR' and then 'RETURN SETRESULTSET('cursorname').

I have been trying to figure out the proper syntax to use such an approach. I have the following code presently and I am not sure if there is something I could do to support that approach:
                oCommand.Connection.Open()

                ' Add all command text
                If oCommandText.Count > 0 Then
                    For Each lcCommandText In oCommandText
                        oCommand.CommandText = lcCommandText
                        oCommand.ExecuteNonQuery()
                    Next
                End If

                oCommand.CommandText = tcSQL + " INTO CURSOR Temp"
                oCommand.ExecuteNonQuery()
                oCommand.CommandText = "RETURN SETRESULTSET(""Temp"")"
                oCommand.ExecuteNonQuery()

                oDataAdapter.SelectCommand = oCommand
                oDataSet = New DataSet

                ' By default, .NET does not add the specific field length, which is needed in XML as at the other end
                ' someone would always get memo field instead of character field
                oDataAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey

                oDataAdapter.Fill(oDataSet)
Basically, the RETURN SETRESULTSET line is the one which is not working. I obtain:

"One or more errors occurred during processing of command."

I guess there is some adjustments that has to be done as I am using the data adapter to fill the dataset. Using that design, is your approach still applicable?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform