ORA-01009
Posted: Thu 23 Jun 2005 08:37
Some module use TStoredProc to call procedure with RefCursor, for example:
FUNCTION PrintAgrAvto(pIsn NUMBER, pObjIsn NUMBER:=NULL) RETURN TRefCursor;
or
FUNCTION PrintAgrOsago(pIsn Agreement.isn%TYPE) RETURN TRefCursor;
or
FUNCTION PrintAgrAdd4(pIsn Agreement.isn%TYPE) RETURN TRefCursor;
in package
and use next code in Delphi to call:
....
try
spPrintDoc.Sql.Clear;
spPrintDoc.StoredProcName:=qDocTemplPROCNAME.AsString;
spPrintDoc.PrepareSQL;
spPrintDoc.params.parambyname('pISN').AsFloat:=pISN;
if pListParamsnil then
begin
if VarIsArray(pListParams.ParamList) then
begin
for j:=VarArrayLowBound(pListParams.ParamList,1) to VarArrayHighBound(pListParams.ParamList,1) do
begin
spPrintDoc.params[2+j].Value:=pListParams.ParamList[j];
end;
end
else spPrintDoc.params[2].Value:=pListParams.ParamList;
end;
If not spPrintDoc.Prepared then spPrintDoc.Prepare;
spPrintDoc.ExecProc;
except
on e:Exception do
begin
Application.MessageBox(PAnsiChar('Print error !'+#13#10+
E.Message),'Error',mb_Ok);
spPrintDoc.Close;
qDocTempl.Close;
Exit;
end;
end;
...
This is work, but any time we've an exception ORA-01009 "Missing mandatory parameters". I used debug forms to view parameters.
All right. But error occured at time and again. This is may have place
or not. This problem have a fortuitous character.
It's Important. Any call StoredProc or OraSql in other modules in this session after ORA-01009 have error ORA-01009. The users must restart program after gotten the ORA-01009. It's hurt industry.
I'm try on to change code to use TOraSql but no effect.
Please! Help to resolve this problem.
ODAC 5.50.0.15
Delphi 7
Oracle 9
FUNCTION PrintAgrAvto(pIsn NUMBER, pObjIsn NUMBER:=NULL) RETURN TRefCursor;
or
FUNCTION PrintAgrOsago(pIsn Agreement.isn%TYPE) RETURN TRefCursor;
or
FUNCTION PrintAgrAdd4(pIsn Agreement.isn%TYPE) RETURN TRefCursor;
in package
and use next code in Delphi to call:
....
try
spPrintDoc.Sql.Clear;
spPrintDoc.StoredProcName:=qDocTemplPROCNAME.AsString;
spPrintDoc.PrepareSQL;
spPrintDoc.params.parambyname('pISN').AsFloat:=pISN;
if pListParamsnil then
begin
if VarIsArray(pListParams.ParamList) then
begin
for j:=VarArrayLowBound(pListParams.ParamList,1) to VarArrayHighBound(pListParams.ParamList,1) do
begin
spPrintDoc.params[2+j].Value:=pListParams.ParamList[j];
end;
end
else spPrintDoc.params[2].Value:=pListParams.ParamList;
end;
If not spPrintDoc.Prepared then spPrintDoc.Prepare;
spPrintDoc.ExecProc;
except
on e:Exception do
begin
Application.MessageBox(PAnsiChar('Print error !'+#13#10+
E.Message),'Error',mb_Ok);
spPrintDoc.Close;
qDocTempl.Close;
Exit;
end;
end;
...
This is work, but any time we've an exception ORA-01009 "Missing mandatory parameters". I used debug forms to view parameters.
All right. But error occured at time and again. This is may have place
or not. This problem have a fortuitous character.
It's Important. Any call StoredProc or OraSql in other modules in this session after ORA-01009 have error ORA-01009. The users must restart program after gotten the ORA-01009. It's hurt industry.
I'm try on to change code to use TOraSql but no effect.
Please! Help to resolve this problem.
ODAC 5.50.0.15
Delphi 7
Oracle 9