View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
tamirh tamirh is offline
external usenet poster
 
Posts: 4
Default Parameterized SQL Statements

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?