Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OledbCommand Parameters with Vfp7
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
OledbCommand Parameters with Vfp7
Divers
Thread ID:
00621623
Message ID:
00621623
Vues:
42
Hi guys,

i used c# and vfp 7 as DataBase. i used oledb driver of vfp 7 to communicate and i try to use parameter with the oledbcommand object to call vfp7 storeprocedure.

That's the code that i'm trying to get work.
Do you have a idea or a sugestion ?

Thank's in Advance
Rock

Ex:

OleDbConnection Connection = new OleDbConnection("provider=vfpoledb;data source=C:/Ga.dbc");

OleDbCommand Cmd = new OleDbCommand();
Cmd.Connection = Connection;
Cmd.CommandText = "MyFunction(?)";

OleDbParameter CmdParam = Cmd.CreateParameter();
CmdParam.ParameterName="lnId";
CmdParam.OleDbType = OleDbType.Integer;
CmdParam.Value = 1 ;

Cmd.Parameters.Add(CmdParam);

Connection.Open();
int lnTmp = 0 ;

try
{
lnTmp = (int) Cmd.ExecuteScalar();
}
catch(Exception e)
{
Console.WriteLine(e.Message);
System.Console.ReadLine();
}
Répondre
Fil
Voir

Click here to load this message in the networking platform