I have an ORACLE database that I'm hooked to via VFP6.0
I can create remote views and use SQLExec() to fire off SQL statements against the ORACLE tables. I need to trigger/execute some ORACLE stored procedures from a VFP program. I've tried this:
Note that the stored procedure is called STPROCNAM in this example:
The stored proc doesn't return a data set so I left out the cursor name but I've also tried the statement below in case this is a problem:
In every case my connection succeeds but my attempt to fire the stored procedure returns a code of -1 for SQLFlag indicating failure. The books say that SQL Pass Through will allow execution of any valid db command. I assume this includes db stored procs.
Note that testing the statement below, I have no problems, so this is definitely related to Stored Proc execution.
I can create remote views and use SQLExec() to fire off SQL statements against the ORACLE tables. I need to trigger/execute some ORACLE stored procedures from a VFP program. I've tried this:
Note that the stored procedure is called STPROCNAM in this example:
Code:
nHandle = SQLConnect('db','userid','password')
IF nHandle > -1 * connection established
SQLFlag = SQLExec(nHandle,'stprocnam')
ENDIF
Code:
SQLFlag = SQLExec(nHandle,'stprocnam','MyCursor')
Note that testing the statement below, I have no problems, so this is definitely related to Stored Proc execution.
Code:
SQLFlag = SQLExec(nHandle,'select * from Tblnam','MyCursor')