|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Special Characters in data retrieved by ESQL from Oracle |
« View previous topic :: View next topic » |
Author |
Message
|
amvit |
Posted: Thu Mar 03, 2011 8:33 pm Post subject: Special Characters in data retrieved by ESQL from Oracle |
|
|
Newbie
Joined: 03 Mar 2011 Posts: 4
|
Hello,
Environment details - WMB 6.1.0.4 on Windows
Database - Oracle 10g on Windows
I have one ESQL function that is executing a Select query against a database table as below
Code: |
DECLARE CONFIGDBDATA ROW;
DECLARE SchemaName CHAR Get_Schema();
SET CONFIGDBDATA.RECORD[] = SELECT col1, col2 , col3 FROM Database.{SchemaName}.MY_CONFIGURATION AS T;
|
Once executed I iterate through the records. While iterating I found some junk character in the column values. for e.g if a col1 has a value "Amit" in database, the value that is retrieved during iteration is
Quote: |
A[junkchar]M[junkchar]I[junkchar]T[junkchar]. |
The data is accessed using
Code: |
CONFIGDBDATA.RECORD[COUNT].col1
|
I am not sure why this is happening. Whenever I run the query directly against the database using SQL editor, data retrieved does not show junk characters.
Any help shall be highly appreciated.
Regards,
Amit |
|
Back to top |
|
 |
rekarm01 |
Posted: Thu Mar 03, 2011 9:33 pm Post subject: Re: Special Characters in data retrieved by ESQL from Oracle |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
|
Back to top |
|
 |
skoobee |
Posted: Thu Mar 03, 2011 10:23 pm Post subject: |
|
|
Acolyte
Joined: 26 Nov 2010 Posts: 52
|
The data is in Unicode, UCS-2, a double-byte character set, WMB's working char set. What you are referring to as junk characters are the second bytes of each character.
THERE ARE NO SPECIAL CHARACTERS, THERE ARE JUST CHARACTERS! |
|
Back to top |
|
 |
amvit |
Posted: Sun Mar 06, 2011 4:56 am Post subject: |
|
|
Newbie
Joined: 03 Mar 2011 Posts: 4
|
Hello all,
Thanks a lot for valuable information.
The correct configuration of DSN resolved this issue with 2 byte sized character data.
Sorry I did not realize earlier that its not special characters. I struggled initially because I was looking at the logs in Notepad, where it showed only spaces. It is only when I started looking at the logs in WMBKT understood there is that extra char that is coming.
I had created the DSN using Oracle driver instead of the MQ one that is mentioned in the documentation.
Thank you once again for your support.
Regards,
Amit |
|
Back to top |
|
 |
rekarm01 |
Posted: Sun Mar 06, 2011 8:22 am Post subject: Re: Special Characters in data retrieved by ESQL from Oracle |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
skoobee wrote: |
THERE ARE NO SPECIAL CHARACTERS, THERE ARE JUST CHARACTERS! |
Perhaps, but it's not worth SHOUTing about. Those not familiar with the formal terminology often use the term "special characters" to informally describe non-printable characters, non-ASCII characters, characters that require some form of escaping mechanism such as XML/HTML entities, or unexpected characters introduced by improper conversion. The usage is widespread enough that it usually serves to get the point across. But feel free to offer a more precise term instead, whenever the need arises. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|