I am trying to use UniDAC to update a Unicode Oracle database (character set: AL32UTF8
I try these 3 and nothing will update a NVARCHAR2 field correctly - it shows as ????? after the post.
UPDATE UNICODETEST SET FULL_NAME = 'ΕΖΗΘΙΚΛΜΝΞΟβγδεζηθικλμ' WHERE KEY_FIELD = 'RECORD1'
or this: UPDATE UNICODETEST SET FULL_NAME = UNISTR('ΕΖΗΘΙΚΛΜΝΞΟβγδεζηθικλμ') WHERE KEY_FIELD = 'RECORD1'
or this: UPDATE UNICODETEST SET FULL_NAME = N'ΕΖΗΘΙΚΛΜΝΞΟβγδεζηθικλμ' WHERE KEY_FIELD = 'RECORD1'
Any ideas? This problem does not occur with ODAC.
Thanks,
Rhett
UniDAC with Oracle Unicode Problem
Hello,
To resolve the problem you should set the OraCallUni.OCIUnicode variable to true ( in this case you need to include the OraCallUni unit in the uses section), or use parameters in the query like
UPDATE UNICODETEST
SET FULL_NAME = :full_name
WHERE KEY_FIELD = 'RECORD1'
UniQuery.ParamByNAme('full_name').AsWideString:= 'ΕΖΗΘΙΚΛΜΝΞΟβγδεζηθικλμ';
a more correct variant is use is use the query with the parameters.
To resolve the problem you should set the OraCallUni.OCIUnicode variable to true ( in this case you need to include the OraCallUni unit in the uses section), or use parameters in the query like
UPDATE UNICODETEST
SET FULL_NAME = :full_name
WHERE KEY_FIELD = 'RECORD1'
UniQuery.ParamByNAme('full_name').AsWideString:= 'ΕΖΗΘΙΚΛΜΝΞΟβγδεζηθικλμ';
a more correct variant is use is use the query with the parameters.
Thanks for the help. I am actually already setting OraCalUni.OCIUnicode to True. I only had OraCall unit in my uses though. So I added OraCallUni but still had the same results.
Params have been working for me in testing, but I can't just switch this older code to Params. It's hundreds of thousands of lines of older code that uses constants.
Any other ideas?
Thanks,
Rhett
Params have been working for me in testing, but I can't just switch this older code to Params. It's hundreds of thousands of lines of older code that uses constants.
Any other ideas?
Thanks,
Rhett