Dan,
Is this the most recent version of VFPOLEDB? If not, I'm betting that's your problem.
~~Bonnie
>There is nothing wrong with the connection. It works fine if I just put the value in the command text. But for security reasons, I don't want to concatenate strings. This is not secure code and leaves an opening for SQL injection attacks.
>
>But it is a standard OleDbConnection object with a connection string of:
>
>
>Provider=VFPOLEDB.1;Data Sourc=C:\\VFPNorthwind\\Northwind.DBC
>
>
>The error happens when I try to use the Fill method of a DataAdapter to fill a data set.
>
>>Dan,
>>
>>In one of Dmitry's replies, he mentioned the connection. I don't see where you've specified the connection either. Maybe you should post a little more of your code because you just might be missing something that we can't see from the two lines you posted.
>>
>>Also, which line of code is throwing the exception?
>>
>>~~Bonnie
>>
>>>I'm using the VFPOLEDB provider and I am creating a command object like this:
>>>
>>>
>>>OleDbCommand objCmd = new OleDbCommand("select * from customers where CustomerID = ?");
>>>objCmd.Parameters.Add("CustomerID", "ALFKI");
>>>
>>>
>>>When I execute this command I am getting an OleDbException that says:
>>>
>>>
>>>No value given for one or more required parameters.
>>>
>>>
>>>How do I use the parameter collection to pass parementers to commands?