Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFPOLEDB and Parameters
Message
From
30/06/2004 00:48:20
 
 
To
29/06/2004 21:32:42
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00918644
Message ID:
00918857
Views:
4
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?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform