AccessOracle DatabaseOfStored ProcedureThe following error occurs: When the stored procedure is called in the script, if exec mysp is used, "invalid character" is reported "; if {call mysp} is used, a "cursor error" is reported. It is strange that a platform program of an old version can be used to complete the call with {call mysp.
Troubleshooting:
When accessing the database interface, the se program only distinguishes the statements starting with select from those starting with select. All statements starting with 'select' are processed using the odbc CDatabase: ExecuteSQL function. For statements starting with 'select', use CRecordSet: Open for processing. Therefore, the {call mysp} statement is handled using CDatabase: ExecuteSQL, and there is no problem.
The new version of se uses CRecordSet: Open to process the return of call mysp. This is no problem in Microsoft SqlServer, but it won't work in Oracle.
Solution:
When connecting to the oracle database, statements such as call mysp cannot be processed using crecordset: open, but can only be processed using cdatabase: executesql.
Note:Exec mysp can only be used in the database server's own client, such as the Enterprise Manager of sqlserver or the SQL plus of oracle, and cannot be used in the c Voice interface. Call mysp can be used in any scenario.
The reason for accessing the Oracle database stored procedure in a program developed by VC and the solution are described here. If you want to know