I posted the same article on DOA4.0 Beta forum.
I'd installed DOA4.0 release version.
To replace a substituton variable including in SQL statement including MultiByte charset Char does'nt work.
Please execute the following code, Oracle Error will appear because to replace a subst variable failes.
procedure TForm1.Button1Click(Sender: TObject);
begin
with OracleQuery1 do
begin
Clear;
SQL.Add('select table_name as '#$83#$65#$81#$5B#$83#$75#$83#$8B#$96#$BC);
SQL.Add(' from :TableName');
ShowMessage(SQL.Text);
DeclareVariable('TableName', otSubst);
SetVariable('TableName', 'USER_TABLES');
Execute;
end;
end;
TOracleSession.BytesPerCharacter = bcAutoDetect
Replacing result is
select table_name as '#$83#$65#$81#$5B#$83#$75#$83#$8B#$96#$BC
from :TableNameUSER_TABLE
I'd installed DOA4.0 release version.
To replace a substituton variable including in SQL statement including MultiByte charset Char does'nt work.
Please execute the following code, Oracle Error will appear because to replace a subst variable failes.
procedure TForm1.Button1Click(Sender: TObject);
begin
with OracleQuery1 do
begin
Clear;
SQL.Add('select table_name as '#$83#$65#$81#$5B#$83#$75#$83#$8B#$96#$BC);
SQL.Add(' from :TableName');
ShowMessage(SQL.Text);
DeclareVariable('TableName', otSubst);
SetVariable('TableName', 'USER_TABLES');
Execute;
end;
end;
TOracleSession.BytesPerCharacter = bcAutoDetect
Replacing result is
select table_name as '#$83#$65#$81#$5B#$83#$75#$83#$8B#$96#$BC
from :TableNameUSER_TABLE