Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return data from VFP SP
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01439720
Message ID:
01439726
Vues:
47
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform