ORA-01745 : Invalid Host/Bind Variable Name

Jan

Member
Hi everyone.

I have a problem setting variable names in DOA TOracleDataset (its a part of at Select statement) :

DQry.SQL.Add('Where INITIALER=:UID))');
DQry.DeclareVariable('UID',OtString);
DQry.SetVariable('UID','XXXX');

Here i set a variable called UID which causes the error message mentioned in the subject.

If i change it to
DQry.SQL.Add('Where INITIALER=:INITIALER))');
DQry.DeclareVariable('INITIALER',OtString);
DQry.SetVariable('INITIALER','XXXX');

then it works perfectly, meaning that my variable names MUST be the same as the fieldname.

Why is this different from TQuery and can i do anything to prevent the error ?

I am transferring a huge application from TQueries to DOA, and i would prefer not to change my SQL's

Rgds

Jan
 
This restriction is a little bit different than it appears. The problem is that UID is an Oracle reserved word.

------------------
Marco Kalter
Allround Automations
 
Originally posted by mkalter:
This restriction is a little bit different than it appears. The problem is that UID is an Oracle reserved word.

Ok - so i only have to change it where i use UID as a parameter name.

Thanks for your fast reply

Jan
 
Back
Top