OleDbDataAdapter query parameter (Oracle)

(New to VS.)
I have a simple query that I am entering into the QueryBuilder. (Oracle backend)
SELECT ... FROM... WHERE (emp_last LIKE )
I'm having a problem figuring out the WHERE clause syntax within QueryBuilder/Visual Studio.
When I hit the Execute button, the question mark changes to @PARAM1 and the query seems to run within QueryBuilder. When I hit OK and the dialog closes, I get an Oracle error "Ora-00936". I've tried using a colon with a named parameter also. QueryBuilder doesn't seem to like anything except the question mark.



Answer this question

OleDbDataAdapter query parameter (Oracle)

  • spert

    I'm using .NET Framework Data Provider for OLE DB with Oracle 9i and Visual Studio 2005 v. 8.0.50110.28.

    I was able to get it to work as long as I editted the query within the XSD rather than the query's property CommandText itself.

    Thank you


  • guysky

    You should use the syntax if you're working with OLE DB.

    Could you provide a little background on the version of Visual Studio you're using and the OLE DB provider you're using to talk to your Oracle database (Microsoft's OLE DB provider for Oracle   Oracle's OLE DB provider   Data Direct's )

    With a little more information, you're more likely to get a helpful response on the forum.

    David Sceppa

    ADO.NET Program Manager

    Microsoft



  • DaveM.

    The SqlClient uses the @ParamName syntax so that you can specify parameters by name rather than ordinal position. The OleDb provider doesn't support the named parameter syntax, only the ordinal position. (Ordinal positions are denoted by " ".) I'm not sure why the QueryBuilder is changing your to @PARAM1, but that isn't going to work. Try changing it back to and see if Oracle is happier.

  • OleDbDataAdapter query parameter (Oracle)