Jerry,
To generate the DataSet, first define your SELECT command without the parameter:
SELECT * FROM employee
Generate the DataSet, then edit the command to put the parameter back in.
The bug in the VFP OleDb driver has to do with parameters that are not of string type. Since your lastname parameter is a string, the data adapter and oleDb commands should work OK.
---Tim
>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
Thomas M. Lamm
Bradbury & Associates