TOraStoredProc error
Posted: Fri 31 Jan 2014 22:19
I have the following stored procedure
And the following code to execute it
This is the message I am getting ...
Here is the stack trace from debugger ...
What am I doing wrong here? Why is TOraParamDesc.SetValue(nil) there? I cannot find that in the documentation anywhere.
Code: Select all
CREATE OR REPLACE PROCEDURE MYPROC
(
30+ params .. ALL inputs number(10, number(5) and varchar2(1)
)
AS
BEGIN
-- do something with those fields, like perhaps an insert to a table or something
EXCEPTION
WHEN OTHERS THEN
NULL;
END MYPROC;
/
Code: Select all
FQuery := TOraStoredProc.Create(Nil);
FQuery.Session := FConnection.FConnection;
FQuery.StoredProcName := FName;
FQuery.AutoCommit := False;
FQuery.FetchAll := False;
FQuery.ParamCheck := True;
FQuery.Prepare;
// assign my 30+ params here. verified that all params are assigned
FQuery.Execute;
Code: Select all
First chance exception at $000007FEFD8F940D. Exception class EConvertError with message 'Cannot convert type'. Process TestProject.exe (7004)
Code: Select all
System._RaiseExcept(???)
OraClasses.TOraParamDesc.SetItemAsVariant(11583061,$996EEF8)
OraClasses.InternalSetValue(2046,$B92330)
OraClasses.TOraParamDesc.SetValue(nil)
DBAccess.TCustomDASQL.AssignParamValue($AC33E9,$12AFF0B0)
Ora.TOraSQL.AssignParamValue($AC33E9,$12EBE180)
DBAccess.TCustomDASQL.WriteParams(False)
DBAccess.TCustomDADataSet.Execute