Parameterized SQL Statements

T

tamirh

I wanted to create a parameter in OLE DB Query. My current command text is:
SELECT Orders.OrderID FROM Northwind.dbo_Orders WHERE Orders.OrderID = ?

However this brings up the error "No value given for one or more required
parameters." Which is very true, but I thought it should prompt for that
value (according to http://msdn.microsoft.com/en-us/library/ms141696.aspx).
If I replace the "?" with an actual number, the query executes fine and I get
back the results.

Can anyone help on what I'm doing wrong with the syntax to get the paramater
query to work?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top