Oracle database:
SELECT USERENV ('language') from dual;
AMERICAN_AMERICA.US7ASCII
SELECT * FROM V$NLS_PARAMETERS;
1 NLS_LANGUAGE AMERICAN
2 NLS_TERRITORY AMERICA
3 NLS_CURRENCY $
4 NLS_ISO_CURRENCY AMERICA
5 NLS_NUMERIC_CHARACTERS .,
6 NLS_CALENDAR GREGORIAN
7 NLS_DATE_FORMAT DD-MON-RR
8 NLS_DATE_LANGUAGE AMERICAN
9 NLS_CHARACTERSET US7ASCII
10 NLS_SORT BINARY
11 NLS_TIME_FORMAT HH.MI.SSXFF AM
12 NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
13 NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
14 NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
15 NLS_DUAL_CURRENCY $
16 NLS_NCHAR_CHARACTERSET AL16UTF16
17 NLS_COMP BINARY
18 NLS_LENGTH_SEMANTICS BYTE
19 NLS_NCHAR_CONV_EXCP FALSE
Table:tb_head
STA VARCHAR2(10)
Client computer:
[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE]
"NLS_LANG"="AMERICAN_AMERICA.US7ASCII"
"ORACLE_HOME"="C:\Ora10InstantClient"
[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0]
"ORACLE_HOME"="C:\Ora10InstantClient"
"NLS_LANG"="AMERICAN_AMERICA.US7ASCII"
the delph code is:
begin
uniQuery1.sql.text:='Select sta from tb_head';
uniQuery1.Open;
uniQuery1.Edit;
uniQuery1.FieldByName(ImTbH_sta).Value:='已开票';
uniQuery1.Post;
end;
in oci mode:
sta='已开票';
in direct mode:
sta='???';
oracle Direct modes Chinese update Problem
Delphi 2006
Delphi 7
object UniConnection1: TUniConnection
ProviderName = 'Oracle'
SpecificOptions.Strings = (
'Oracle.UseUnicode=True'
'Oracle.Charset=US7ASCII'
'Oracle.DateLanguage=AMERICAN')
Username = 'htjs'
Password = 'h1111'
Server = 'fp_185'
Connected = True
LoginPrompt = False
Left = 64
Top = 16
end
http://img4.ph.126.net/aIpV8NUruJ3AIuYa ... 355314.jpg
object UniConnection1: TUniConnection
ProviderName = 'Oracle'
SpecificOptions.Strings = (
'Oracle.Direct=True')
Username = 'htjs'
Password = 'h1111'
Server = '192.168.0.185:1521:fp'
Connected = True
LoginPrompt = False
Left = 64
Top = 16
end
http://img8.ph.126.net/DQQlE61h8zyb8zM8 ... 660178.jpg
view in PL/SQL Developer
http://img0.ph.126.net/D7ddrhcpfn2bFEot ... 306880.jpg
Delphi 7
object UniConnection1: TUniConnection
ProviderName = 'Oracle'
SpecificOptions.Strings = (
'Oracle.UseUnicode=True'
'Oracle.Charset=US7ASCII'
'Oracle.DateLanguage=AMERICAN')
Username = 'htjs'
Password = 'h1111'
Server = 'fp_185'
Connected = True
LoginPrompt = False
Left = 64
Top = 16
end
http://img4.ph.126.net/aIpV8NUruJ3AIuYa ... 355314.jpg
object UniConnection1: TUniConnection
ProviderName = 'Oracle'
SpecificOptions.Strings = (
'Oracle.Direct=True')
Username = 'htjs'
Password = 'h1111'
Server = '192.168.0.185:1521:fp'
Connected = True
LoginPrompt = False
Left = 64
Top = 16
end
http://img8.ph.126.net/DQQlE61h8zyb8zM8 ... 660178.jpg
view in PL/SQL Developer
http://img0.ph.126.net/D7ddrhcpfn2bFEot ... 306880.jpg
Hello
Sorry, but http://img4.ph.126.net/aIpV8NUruJ3AIuYa ... 355314.jpg is unreadable because it is too small. Please post this picture again.
I see a difference in your OCI and Direct mode connections: in the OCI mode you define Oracle.Charset=US7ASCII and Oracle.UseUnicode=True, but in the Direct mode don't. Please define the same options in the OCI and Direct modes and try to read data again. Result must be the same. If you get different results in the OCI and Direct modes with the same connection options, please notify us, and we will try to resolve your issue.
Sorry, but http://img4.ph.126.net/aIpV8NUruJ3AIuYa ... 355314.jpg is unreadable because it is too small. Please post this picture again.
I see a difference in your OCI and Direct mode connections: in the OCI mode you define Oracle.Charset=US7ASCII and Oracle.UseUnicode=True, but in the Direct mode don't. Please define the same options in the OCI and Direct modes and try to read data again. Result must be the same. If you get different results in the OCI and Direct modes with the same connection options, please notify us, and we will try to resolve your issue.