ORA-01036: illegal variable name/number

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Vimal
Posts: 1
Joined: Thu 23 Nov 2006 10:54

ORA-01036: illegal variable name/number

Post by Vimal » Thu 23 Nov 2006 11:14

Hi,

We have a application developed in Delphi 5 in which we used ODAC 3.60 for accessing Oracle databases. We upgraded to ODAC 5.70.0.30. After upgrading, the stored procedure created dynamically inside the code produces the ORA-01036: illegal variable name/number error.

Before upgrading it was working without any issues. But after upgrading it produces error. Find the below Delphi 5 code. Please help us to resolve this issue.

Code: Select all

Function AddElement(tblName : string; fieldList: TfieldList;) : string;
var
  spAddElement: TOraStoredProc;
  spParam: TParam;
begin

try
spAddElement := UStoredProc.Create(FDatabase);
spAddElement.StoredProcName := tblName + '_ADD';

for i := 0 to Pred(fieldList.Count) do
begin
aField.Text := fieldList[i];
spParam := spAddElement.CreateParameter('p' + aField.FldName, aField.FldType, ptInput, 0, aField.FldData);
if aField.IsNull then spParam.Clear;
end;

spAddElement.Params.CreateParam(ftString, 'sNewID', ptOutput).Value := '0';
spAddElement.Prepare;
spAddElement.ExecProc;

result := spAddElement.Params.ParamByName('sNewID').AsString;

finally
spAddElement.Free;
end;
end;


Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 23 Nov 2006 12:31

We cannot reproduce the problem. Please send to ODAC support address complete sample that demonstrates the problem and include script to create server objects.

Post Reply