Hy Guys,
I have an issue when trying to update a Clob with a script containing this kind of char ¿ .
When I remove it works very well.
I use a Torasession in Direct mode. with all the default values options.
ANy idea ?
thx for your help.
eric fg
TORASCRIPT : No mapping for the Unicode character exists in the target multi-byte code page
-
- Posts: 5
- Joined: Wed 20 Dec 2017 03:05
Re: TORASCRIPT : No mapping for the Unicode character exists in the target multi-byte code page
Please specify whether you use the UseUnicode and UnicodeEnvironment options in your project:
Code: Select all
OraSession.Options.UseUnicode := True;
OraSession.Options.UnicodeEnvironment := True;
-
- Posts: 5
- Joined: Wed 20 Dec 2017 03:05
Re: TORASCRIPT : No mapping for the Unicode character exists in the target multi-byte code page
yes I tried to put these 2 properties to false and the True : But always get the same issue.
eric
eric
Re: TORASCRIPT : No mapping for the Unicode character exists in the target multi-byte code page
Please provide a small code snippet showing how you change the value of the CLOB field. In addition, please specify the NLS parameters of the Oracle server you are using
-
- Posts: 5
- Joined: Wed 20 Dec 2017 03:05
Re: TORASCRIPT : No mapping for the Unicode character exists in the target multi-byte code page
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_SORT
NLS_DATE_LANGUAGE
NLS_DATE_FORMAT
NLS_CURRENCY
NLS_NUMERIC_CHARACTERS
NLS_ISO_CURRENCY
NLS_CALENDAR
NLS_TIME_FORMAT
NLS_TIMESTAMP_FORMAT
NLS_TIME_TZ_FORMAT
NLS_TIMESTAMP_TZ_FORMAT
NLS_DUAL_CURRENCY
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
I get the issue when trying to execute a script which is a Package, with a special Char inside.
orasession:Torasession;
orascript:TERIC_Orascript;
s:Tstringstream;
begin
orasession:=Torasession.Create(nil);
orasession.Options.UnicodeEnvironment:=true;
orasession.Options.UseUnicode:=true;
orascript:=TERIC_Orascript.Create(nil);
orascript.Session:=orasession;
orasession.ConnectString:=orasessionENV.ConnectString;
orascript.AfterExecute:=OraScriptAfterExecute;
orascript.beforeexecute:= OraScriptBeforeExecute;
orascript.onerror:= OraScriptError;
try
begin
orascript.Numstatement:=0;
orascript.patchko:=false;
orascript.errorcolumn:=0;
orascript.Kalready:=false;
try
try
formaterror(INFO,trim(scriptfile) + ' started:' ,'initmaster2');
orascript.ExecuteFile(trim(scriptfile)); <------ error is raised here
----------------------------------- When I upload my script inside a Clob
stream: TStringStream;
prcc.parambyname('SQLSTMORIGINAL').DataType := ftOraClob;
stream := TStringStream.Create(sql.text);
try
stream.Position := 0;
prcc.parambyname('SQLSTMORIGINAL').LoadFromStream(stream, ftOraClob);
finally
stream.free;
end;
------------ When I download the script from the clob
ostr: Tstream;
ostr := prcc.CreateBlobStream(prcc.Fields[4], bmRead);
try
sql.Clear;
sql.LoadFromStream(ostr);
NLS_TERRITORY AMERICA
NLS_SORT
NLS_DATE_LANGUAGE
NLS_DATE_FORMAT
NLS_CURRENCY
NLS_NUMERIC_CHARACTERS
NLS_ISO_CURRENCY
NLS_CALENDAR
NLS_TIME_FORMAT
NLS_TIMESTAMP_FORMAT
NLS_TIME_TZ_FORMAT
NLS_TIMESTAMP_TZ_FORMAT
NLS_DUAL_CURRENCY
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
I get the issue when trying to execute a script which is a Package, with a special Char inside.
orasession:Torasession;
orascript:TERIC_Orascript;
s:Tstringstream;
begin
orasession:=Torasession.Create(nil);
orasession.Options.UnicodeEnvironment:=true;
orasession.Options.UseUnicode:=true;
orascript:=TERIC_Orascript.Create(nil);
orascript.Session:=orasession;
orasession.ConnectString:=orasessionENV.ConnectString;
orascript.AfterExecute:=OraScriptAfterExecute;
orascript.beforeexecute:= OraScriptBeforeExecute;
orascript.onerror:= OraScriptError;
try
begin
orascript.Numstatement:=0;
orascript.patchko:=false;
orascript.errorcolumn:=0;
orascript.Kalready:=false;
try
try
formaterror(INFO,trim(scriptfile) + ' started:' ,'initmaster2');
orascript.ExecuteFile(trim(scriptfile)); <------ error is raised here
----------------------------------- When I upload my script inside a Clob
stream: TStringStream;
prcc.parambyname('SQLSTMORIGINAL').DataType := ftOraClob;
stream := TStringStream.Create(sql.text);
try
stream.Position := 0;
prcc.parambyname('SQLSTMORIGINAL').LoadFromStream(stream, ftOraClob);
finally
stream.free;
end;
------------ When I download the script from the clob
ostr: Tstream;
ostr := prcc.CreateBlobStream(prcc.Fields[4], bmRead);
try
sql.Clear;
sql.LoadFromStream(ostr);
Re: TORASCRIPT : No mapping for the Unicode character exists in the target multi-byte code page
To investigate the issue, please:
a) provide the results of the query Select * From v$nls_parameters Where Parameter = 'NLS_CHARACTERSET' in your environment
b) provide the value of the parameter "Current language for non-Unicode programs" of your Windows version
c) compose and send us a small full sample, execution of which causes the issue. This sample should include
the used scriptfile. It is convenient to do this using the e-support form (https://www.devart.comthe "Support"\"Request Support" menu)
a) provide the results of the query Select * From v$nls_parameters Where Parameter = 'NLS_CHARACTERSET' in your environment
b) provide the value of the parameter "Current language for non-Unicode programs" of your Windows version
c) compose and send us a small full sample, execution of which causes the issue. This sample should include
the used scriptfile. It is convenient to do this using the e-support form (https://www.devart.comthe "Support"\"Request Support" menu)