Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFPOLEDB and Parameters
Message
De
29/06/2004 17:51:53
 
 
À
29/06/2004 17:45:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
00918660
Message ID:
00918740
Vues:
8
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform