Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OleDb Parameters
Message
From
27/09/2004 07:28:22
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Title:
OleDb Parameters
Miscellaneous
Thread ID:
00946213
Message ID:
00946213
Views:
66
How can I using parameters to select data subset of data from VFP table.

I try using following code, but can't work for me.

Thanks.


-------------------
String selectCmd = "select * from paperoll where supNo = @supNo";

OleDbDataAdapter daPaper = new OleDbDataAdapter(selectCmd, oleDbConnection1);

daPaper.SelectCommand.Parameters.Add(new OleDbParameter("@supNo",OleDbType.Char,5));

daPaper.SelectCommand.Parameters["@supNo"].Value = mySelect.Value;

DataSet dsPaper = new DataSet();
daPaper.Fill(dsPaper, "paperoll");

DataGrid1.DataSource= dsPaper.Tables["paperoll"].DefaultView;
DataGrid1.DataBind();
Next
Reply
Map
View

Click here to load this message in the networking platform