Problem with Torastoredproc execution
Posted: Mon 23 Jun 2008 18:23
Hi There,
I wonder if someone could please help me with a problem that my colleagues and I are having running a stored procedure using the Torastoredproc component in direct mode ( I think it is dierct mode as we have no Oracle client software installed and the Torastoredproc is using port 1521).
We are using Delphi 2005 with ODAC version 6.25.1.13 (but we also get the same problem with ODAC 6.50).
We have a stored procedure sitting on a Oracle 9.2.0.8 standard edition database. This stored procedure takes 23 parameters, with the last 2 being return parameters.
I can call the stored procedure from an SQL script and it works fine, as well as from a C++ program using Microsoft ADO, so the stored procedure actually runs fine.
The problem that we are getting is that the error "parameter not found" is being returned when we try to execute the stored procedure through the Delphi program using ODAC (direct mode).
The parameter name that is being shown as not being found is the first parameter in the list of 23. From the debugging that I have carried out, the stored procedure is not getting called at all, which would tie in with the error message.
The funny thing is that we can get it working OK through the Delphi program on another Oracle server which is also running Oracle standard edition 9.2.
The only thing that I can think of that is different between the working and non-working Oracle databases is that the non-working scenario is a member of a domain, whereas the working version is just a workgroup.
This is the code for seting up the call to the stored procedure :-
OraStoredProc1.ParamByName('P_OPERATOR').AsString :=RiMaORACLESetNew.MeasOperator;
OraStoredProc1.ParamByName('P_DATE').AsString :=RiMaORACLESetNew.MeasDate;
OraStoredProc1.ParamByName('P_TIME').AsString :=RiMaORACLESetNew.MeasTime;
OraStoredProc1.ParamByName('P_TOOL_SERIAL').AsString :=RiMaORACLESetNew.MeasIdent;
OraStoredProc1.ParamByName('P_TOOL_SIZE').AsFloat :=RiMaORACLESetNew.MeasDiaIn;
OraStoredProc1.ParamByName('P_TOOL_OD').AsFloat :=RiMaORACLESetNew.MeasDiaOut;
OraStoredProc1.ParamByName('P_OVAL_ID').AsFloat :=RiMaORACLESetNew.MeasOvaIn;
OraStoredProc1.ParamByName('P_OVAL_OD').AsFloat :=RiMaORACLESetNew.MeasOvaOut;
OraStoredProc1.ParamByName('P_CONCENTRIC').AsFloat :=RiMaORACLESetNew.MeasConcent;
OraStoredProc1.ParamByName('P_MAX_DIA').AsFloat :=RiMaORACLESetNew.MeasPosMaxDia;
OraStoredProc1.ParamByName('P_TEMP').AsFloat :=RiMaORACLESetNew.MeasTemp;
OraStoredProc1.ParamByName('P_CAL_DATE').AsString :=RiMaORACLESetNew.CalibDate;
OraStoredProc1.ParamByName('P_CAL_TIME').AsString :=RiMaORACLESetNew.CalibTime;
OraStoredProc1.ParamByName('P_CAL_SERIAL').AsString :=RiMaORACLESetNew.CalibIdent;
OraStoredProc1.ParamByName('P_CAL_ID').AsFloat :=RiMaORACLESetNew.CalibDiaIn;
OraStoredProc1.ParamByName('P_CAL_OD').AsFloat :=RiMaORACLESetNew.CalibDiaOut;
OraStoredProc1.ParamByName('P_CAL_OVAL_ID').AsFloat :=RiMaORACLESetNew.CalibOvaIn;
OraStoredProc1.ParamByName('P_CAL_OVAL_OD').AsFloat :=RiMaORACLESetNew.CalibOvaOut;
OraStoredProc1.ParamByName('P_CAL_CONCENTRIC').AsFloat :=RiMaORACLESetNew.CalibConcent;
OraStoredProc1.ParamByName('P_CAL_MAX_DIA').AsFloat :=RiMaORACLESetNew.CalibPosMaxDia;
OraStoredProc1.ParamByName('P_CAL_TEMP').AsFloat :=RiMaORACLESetNew.CalibTemp;
OraStoredProc1.ExecProc;
s1 := OraStoredProc1.ParamByName('P_RETURN_RESULT').AsString;
BodyMakerNo := OraStoredProc1.ParamByName('P_RETURN_MACHINE').AsInteger;
I am thinking that it might be a security issue on the domain installations of Oracle? Any help / pointers would be much appreciated.
Thank you
Clint
I wonder if someone could please help me with a problem that my colleagues and I are having running a stored procedure using the Torastoredproc component in direct mode ( I think it is dierct mode as we have no Oracle client software installed and the Torastoredproc is using port 1521).
We are using Delphi 2005 with ODAC version 6.25.1.13 (but we also get the same problem with ODAC 6.50).
We have a stored procedure sitting on a Oracle 9.2.0.8 standard edition database. This stored procedure takes 23 parameters, with the last 2 being return parameters.
I can call the stored procedure from an SQL script and it works fine, as well as from a C++ program using Microsoft ADO, so the stored procedure actually runs fine.
The problem that we are getting is that the error "parameter not found" is being returned when we try to execute the stored procedure through the Delphi program using ODAC (direct mode).
The parameter name that is being shown as not being found is the first parameter in the list of 23. From the debugging that I have carried out, the stored procedure is not getting called at all, which would tie in with the error message.
The funny thing is that we can get it working OK through the Delphi program on another Oracle server which is also running Oracle standard edition 9.2.
The only thing that I can think of that is different between the working and non-working Oracle databases is that the non-working scenario is a member of a domain, whereas the working version is just a workgroup.
This is the code for seting up the call to the stored procedure :-
OraStoredProc1.ParamByName('P_OPERATOR').AsString :=RiMaORACLESetNew.MeasOperator;
OraStoredProc1.ParamByName('P_DATE').AsString :=RiMaORACLESetNew.MeasDate;
OraStoredProc1.ParamByName('P_TIME').AsString :=RiMaORACLESetNew.MeasTime;
OraStoredProc1.ParamByName('P_TOOL_SERIAL').AsString :=RiMaORACLESetNew.MeasIdent;
OraStoredProc1.ParamByName('P_TOOL_SIZE').AsFloat :=RiMaORACLESetNew.MeasDiaIn;
OraStoredProc1.ParamByName('P_TOOL_OD').AsFloat :=RiMaORACLESetNew.MeasDiaOut;
OraStoredProc1.ParamByName('P_OVAL_ID').AsFloat :=RiMaORACLESetNew.MeasOvaIn;
OraStoredProc1.ParamByName('P_OVAL_OD').AsFloat :=RiMaORACLESetNew.MeasOvaOut;
OraStoredProc1.ParamByName('P_CONCENTRIC').AsFloat :=RiMaORACLESetNew.MeasConcent;
OraStoredProc1.ParamByName('P_MAX_DIA').AsFloat :=RiMaORACLESetNew.MeasPosMaxDia;
OraStoredProc1.ParamByName('P_TEMP').AsFloat :=RiMaORACLESetNew.MeasTemp;
OraStoredProc1.ParamByName('P_CAL_DATE').AsString :=RiMaORACLESetNew.CalibDate;
OraStoredProc1.ParamByName('P_CAL_TIME').AsString :=RiMaORACLESetNew.CalibTime;
OraStoredProc1.ParamByName('P_CAL_SERIAL').AsString :=RiMaORACLESetNew.CalibIdent;
OraStoredProc1.ParamByName('P_CAL_ID').AsFloat :=RiMaORACLESetNew.CalibDiaIn;
OraStoredProc1.ParamByName('P_CAL_OD').AsFloat :=RiMaORACLESetNew.CalibDiaOut;
OraStoredProc1.ParamByName('P_CAL_OVAL_ID').AsFloat :=RiMaORACLESetNew.CalibOvaIn;
OraStoredProc1.ParamByName('P_CAL_OVAL_OD').AsFloat :=RiMaORACLESetNew.CalibOvaOut;
OraStoredProc1.ParamByName('P_CAL_CONCENTRIC').AsFloat :=RiMaORACLESetNew.CalibConcent;
OraStoredProc1.ParamByName('P_CAL_MAX_DIA').AsFloat :=RiMaORACLESetNew.CalibPosMaxDia;
OraStoredProc1.ParamByName('P_CAL_TEMP').AsFloat :=RiMaORACLESetNew.CalibTemp;
OraStoredProc1.ExecProc;
s1 := OraStoredProc1.ParamByName('P_RETURN_RESULT').AsString;
BodyMakerNo := OraStoredProc1.ParamByName('P_RETURN_MACHINE').AsInteger;
I am thinking that it might be a security issue on the domain installations of Oracle? Any help / pointers would be much appreciated.
Thank you
Clint