Hello,
I have a program developed in Delphi 6 with odac Version 6.90.0.54
I can create a new stored procedure by running this code:
StorelandOraStoredProc.SQL.Text: = 'CREATE OR REPLACE PROCEDURE proc_test IS BEGIN NULL; END;';
// Not mandatory StoredProcName
StorelandOraStoredProc.ExecSQL;
It works.
We are migrating the program with Delphi XE4 with odac Version 9.0.1
The same code does not work.
1 - I get the message must be defined StoredProcName.
2 - When I set StoredProcName I have an ORA-04043 error: object does not exist proc_test
Here is the code with Delphi XE4:
OraStoredProc.SQL.Text: = 'CREATE OR REPLACE PROCEDURE proc_test IS BEGIN NULL; END;';
// If StoredProcName, I get the error message: StoredProcName must be defined.
OraStoredProc.StoredProcName: = 'proc_test';
OraStoredProc.ExecSQL;
My question: How to create a new stored procedure with ODAC v9.0.1?
What is the correct method?
Thank you.
Error when I create a new stored procedure with TOraStoredProc
Re: Error when I create a new stored procedure with TOraStoredProc
Hello,
This is a correct error message, since the OraStoredProc component is designed for work with existing procedures. To create procedures, you can use the following components:
This is a correct error message, since the OraStoredProc component is designed for work with existing procedures. To create procedures, you can use the following components:
Code: Select all
OraSession1.ExecSQL('CREATE OR REPLACE PROCEDURE proc_test IS BEGIN NULL; END;');
OraQuery1.SQL.Text('CREATE OR REPLACE PROCEDURE proc_test IS BEGIN NULL; END;');
OraQuery1.Execute;
OraSQL1.SQL.Text('CREATE OR REPLACE PROCEDURE proc_test IS BEGIN NULL; END;');
OraSQL1.Execute;
OraScript1.SQL.Text('CREATE OR REPLACE PROCEDURE proc_test IS BEGIN NULL; END;');
OraScript1.Execute;
Re: Error when I create a new stored procedure with TOraStoredProc
If you have any further questions, feel free to contact us.