Progress
SQL-92
Guide and Reference
Invoking Stored Procedures
How applications call stored procedures depends on their environment.
From ODBC
From ODBC, applications use the ODBC call escape sequence:
Use parameter markers (question marks used as placeholders) for input or output parameters to the procedure. You can also use literal values for input parameters only. Progress SQL-92 stored procedures do not support return values in the ODBC escape sequence. See the Microsoft ODBC Programmer’s Reference , Version 3.0, for more information on calling procedures from ODBC applications.
Embed the escape sequence in an ODBC SQLExecDirect call to execute the procedure.
EXAMPLEThis example shows a call to a stored procedure named order_parts that passes a single input parameter using a parameter marker:
From JDBC
The JDBC call escape sequence is the same as in ODBC:
Embed the escape sequence in a JDBC CallableStatement.prepareCall method invocation.
EXAMPLEThis example shows the JDBC code parallel to the ODBC code excerpt shown in the previous example:
From SQL Explorer
From SQL Explorer, issue the SQL CALL statement.
EXAMPLEThis example shows the CALL statement that invokes the order_parts stored procedure, using a literal value instead of a parameter marker:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |