Print Thread
unicode support for nvarchar2
#51356 04/28/15 01:16 PM
Joined: Apr 2015
Posts: 4
T
tvr Offline OP
Member
OP Offline
Member
T
Joined: Apr 2015
Posts: 4
Hello,

I have oracle database with db. character set EE8MSWIN1250, national character set AL16UTF16. Delphi is XE2.
When I create nvarchar2 field and try to store there unicode text with TOracleQuery with INSERT statement, then data are not stored correctly.

Problem is when TOracleQuery.DeclareVariable is called - on the end of this procedure is call to DeclareVariableCharSet .... with charsetform ocfDatabase.

When I call manually
fQuery.DeclareVariableCharSet(AName, ocfNational, fQuery.Session.CurrentNCharSetID);

then query work as expected. Does it mean, that I need to take control of calling DeclareVariableCharSet on nchar/nvarchar2 database fields? Is it not possible to do it automatically similar to SQL select statement, where CharSetForm and ChareSetID are detected automatically during query describe?


Re: unicode support for nvarchar2
tvr #51363 04/29/15 09:32 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
You will indeed explicitly need to set the character set for such a scenario.


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.030s Queries: 14 (0.007s) Memory: 2.4997 MB (Peak: 3.0421 MB) Data Comp: Off Server Time: 2024-05-16 22:03:45 UTC
Valid HTML 5 and Valid CSS