Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OledbCommand Parameters with Vfp7
Message
 
To
All
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
OledbCommand Parameters with Vfp7
Miscellaneous
Thread ID:
00621623
Message ID:
00621623
Views:
37
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();
}
Reply
Map
View

Click here to load this message in the networking platform