Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return data from VFP SP
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01439720
Message ID:
01439726
Views:
48
>Hi All, is it possible to execute a VFP SP using a OleDbCommand.ExecuteReader() command - which will return a DataReader object ?
>
>
>*-- My SP
>
>Procedure GetData()
>Select x from mytable
>EndProc
>
>
Don't know if it will work for you but I've done this using SETRESULTSET() in the VFP SP and using an OleDbDataAdapter in .NET. e.g .NET code:
        OleDbDataAdapter Da = new OleDbDataAdapter();
        Da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
            Da.SelectCommand = (OleDbCommand) oConn.CreateCommand();
            Da.SelectCommand.CommandType = CommandType.StoredProcedure;
            Da.SelectCommand.CommandText = "SelectPostCodes";

            Da.SelectCommand.Parameters.AddWithValue("@a", lcInCode);
            Da.SelectCommand.Parameters.AddWithValue("@a", lcOutCode);

            Da.Fill(DSAddresses, "Addresses");
HTH,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform