Information générale
Catégorie:
Bases de données
Thanks, I believe I heard the same thing a while back. I'm using a different technique to accomplish this.
Thanks,
Jerry
>Jerry,
>
>I could be wrong (and somebody *please* correct me if I am!), but I think I remember reading somwhere (here probably) that this is a bug in VFP's OLEDB provider and will be fixed in the next release.
>
>~~Bonnie
>
>
>>Looks like the oleDbDataAdapter cannot create parameterized queries with VFP table. However, looks like it does work with Access data, etc...
>>
>>The way I found to do this was:
>>
>>oleDbDataAdapter1.SelectCommand.CommandText = "Select * from employee " +
>> "where employee.lastname = '" + lc_search + "' order by lastname";
>>
>>dsEmpLast1.Clear();
>>oleDbDataAdapter1.Fill(dsEmpLast1);
>>
>>Thanks
>>
>>Jerry
>>
>>
>>>I'm using C# to create a WinForm to display a VFP table. I want the user to enter in a employee's last name and have the form look up that employee record from employee.dbf.
>>>
>>>I create an oleDbDataAdapter on the form and connect to a free VFP table. I build a SQL command as follows:
>>>
>>> SELECT * FROM employee WHERE (lastname = ?)
>>>
>>>My problem is that when I attempt to generate a DataSet, I get the following error message:
>>>
>>> Retrieving the schema for oleDbDataAdpater1 failed. No value given for one or more required parameters.
>>>
>>>How can I create a parameterized query in C#? Or what am I doing wrong?
>>>
>>>Thanks,
>>>
>>>Jerryt
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement