Updating Unicode through TOraQuery
Posted: Fri 09 Apr 2010 19:17
Hi,
I am trying unicode enable an old Delphi 5 app and am having trouble writing unicode to the database. The database is 11g and the characterset is AL32UTF8. I have downloaded the latest version of ODAC for d5 - 6.90. If i use ADO it works fine, but i need to use ODAC with direct connect so there is no need for drivers on the client machines.
The following is a sample of the query i am running...
OraSession.Options.UseUnicode := True;
OraSession.Options.Charset := 'AL32UTF8';
with qryUpdate do
begin
close;
sql.clear;
sql.add('update TEST_TABLE set name = :nme where id = :myid');
ParamByName('nme').value := edELName.text;
ParamByName('myid').value := edELID.text;
execsql;
end;
I have tried using ParamByName('nme').aswidestring and that doesn't help - database is showing ? for the unicode characters. The datatype in the table for the unicode string is NVARCHAR2. Please can you help with this as i am stuck.
thanks,
jp
I am trying unicode enable an old Delphi 5 app and am having trouble writing unicode to the database. The database is 11g and the characterset is AL32UTF8. I have downloaded the latest version of ODAC for d5 - 6.90. If i use ADO it works fine, but i need to use ODAC with direct connect so there is no need for drivers on the client machines.
The following is a sample of the query i am running...
OraSession.Options.UseUnicode := True;
OraSession.Options.Charset := 'AL32UTF8';
with qryUpdate do
begin
close;
sql.clear;
sql.add('update TEST_TABLE set name = :nme where id = :myid');
ParamByName('nme').value := edELName.text;
ParamByName('myid').value := edELID.text;
execsql;
end;
I have tried using ParamByName('nme').aswidestring and that doesn't help - database is showing ? for the unicode characters. The datatype in the table for the unicode string is NVARCHAR2. Please can you help with this as i am stuck.
thanks,
jp