Hello,
I am needing some assistance in executing an Oracle stored procedure from a 4D
v17R4 application. It has only one input parameter as varchar, and the output
results come in the form of a cursor, consisting of a table with three columns
and n rows.
This is the stored procedure that the oracle developer created and sent me -
ADC.PKG_EXTACCESSSQL.SELECTJOBINFORMATIONBYSERIAL(serialNumber IN varchar2,
dataOutput OUT cursorType).
I can run this, using Oracle SQL Developer, and get the expected results, but
running it in 4D generates various errors depending on how I format the method.
I have tried the following approaches, based on the examples in the Language
reference, but both generate ODBC errors.
Method 1
C_TEXT($sql)
C_TEXT(serialNumber;dataOutput)
serialNumber:="711030309743"
$sql:="call ADC.PKG_EXTACCESSSQL.SELECTJOBINFORMATIONBYSERIAL(?, ?)"
SQL LOGIN("ODBC:fbcDelicias_test";"REPORT_USR";"RptB0Us#r")
If (OK=1)
SQL SET PARAMETER(serialNumber;SQL param in)
SQL SET PARAMETER(dataOutput;SQL param out)
SQL EXECUTE($sql;dataOutput)
SQL LOAD RECORD(SQL all records)
//Place the data validation code here
SQL CANCEL LOAD
End if
SQL LOGOUT
Method 2
C_TEXT($sql)
C_TEXT(serialNumber;dataOutput)
serialNumber:="711030309743"
$sql:="call
ADC.PKG_EXTACCESSSQL.SELECTJOBINFORMATIONBYSERIAL(<<serialNumber>>,<<dataOutput>>)"
SQL LOGIN("ODBC:myUserName";"REPORT_USR";"RptB0Us#r")
If (OK=1)
SQL EXECUTE($sql;dataOutput)
SQL LOAD RECORD(SQL all records)
//Place the data validation code here
SQL CANCEL LOAD
End if
SQL LOGOUT
Thank you for any suggestions you might have!
Brad Olson
CommScope, Inc.
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************