Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFPOLEDB and Parameters
Message
From
29/06/2004 17:51:53
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
00918660
Message ID:
00918740
Views:
9
I've already seen this and tried something similar. We don't interact directly with the DataAdapter, it is abstracted in our framework classes. We just send it a command object. I have tried to add parameters to the command object just like they do in this sample, but that did not work for me either.

I think that there is a problem in the VFPOLEDB Provider when using the paramter collection...

>Here what I found in HELP:
>
>
>Example
>[Visual Basic, C#] The following example creates multiple instances of OleDbParameter through the OleDbParameterCollection collection within the OleDbDataAdapter. These parameters are used to select data from the data source and place the data in the DataSet. This example assumes that a DataSet and an OleDbDataAdapter have already been created with the appropriate schema, commands, and connection.
>
>[Visual Basic]
>Public Sub AddOleDbParameters()
>    ' ...
>    ' create myDataSet and myDataAdapter
>    ' ...
>myDataAdapter.SelectCommand.Parameters.Add("@CategoryName", OleDbType.VarChar, 80).Value = "toasters"
>myDataAdapter.SelectCommand.Parameters.Add("@SerialNum", OleDbType.Integer).Value = 239
>myDataAdapter.Fill(myDataSet)
>End Sub 'AddOleDbParameters
>
>
>[C#]
>public void AddOleDbParameters()
> {
> // ...
> // create myDataSet and myDataAdapter
> // ...
>   myDataAdapter.SelectCommand.Parameters.Add("@CategoryName", OleDbType.VarChar, 80).Value = "toasters";
>   myDataAdapter.SelectCommand.Parameters.Add("@SerialNum", OleDbType.Integer).Value = 239;
>   myDataAdapter.Fill(myDataSet);
> }
>
Thanks,
Dan Jurden
djurden@outlook.com
Previous
Reply
Map
View

Click here to load this message in the networking platform