Forum Stats

  • 3,784,354 Users
  • 2,254,928 Discussions


Call stored procedure and bind parameters by name

edited Dec 10, 2015 10:29AM in ODBC


I am using the Oracle ODBC 12c Driver to pass values from an Interface to our Oracle 11.2 database. The Interface Software gathers the data from modbus protocoll and calls a stored procedure. At the moment my syntax to call the stored procedure looks like this:

call procedure_Name('STRING', 'Timestamp as String', numValue1);

This works fine. Now i have to add a default parameter to my procedure. To stay flexible for further changes i want to call the procedure and bind the parameters by name. Release Notes of ODBC sais:

Added support for named parameter, binding parameters by name. Oracle ODBC driver now allows application to specify the parameters to a stored procedure by name, in the procedure call. Named parameters are only to be used in calls to stored procedures, and not to be used in other SQL Statements.

So it should not be a problem to use the named notation, but how would I do this from ODBC? I tried it like this, but oracle returns an ora-00936 missing expression error:

     call procedure_Name(paramName1 => 'STRING',paramName2 => 'Timestamp as String',paramName3 => numValue1);

Thank you for your Help.


Best Answer


This discussion has been closed.