views:

168

answers:

4

Hi Guys,

i'm developing a 32bit Client-Application with Delphi. From this application I need to connect to databases on two different servers. First databse character set ist WE8MSWIN1252, the other server decodes with WE8PC850. Setting the client NLS_LANG parameter to the correct value solves correct sql-query results.

Unfortunately this (the client character-set) seems only to be recognized on applications startup (first connect to oracle). I need to change the client-characterset at runtime. Oracle client seems to store the character set an application used to connect!

beside: I#m using udl-files to setup the connections (Microsoft OLE DB - driver)

what can I do?

A: 

You could use ALTER SESSION calls to change the settings at the session level after connecting to the database.

Dougman
A: 

I need to change the client-characterset at runtime.

Why ? I would have thought what you want at the client end is a character set that is acceptable to the operating environment and end-user.

Pick out a character set such as UTF-8 and let Oracle handle the conversion between the client character set and the two database character sets.

Gary
A: 

Gary: can u tell me the correct character_set? The results of SQL-Command "Select userenv('LANGUAGE') from dual;" are:

1) GERMAN_GERMANY.WE8PC850 2) GERMAN_GERMANY.WE8MSWIN1252

Dougman: can you specify the full SQL-statement?

Peter Shower
A: 

See if this post helps:

Oracle NLS_LANG for language/territory/character set

Leniel Macaferi