473,473 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Retrieve and display unicode data using ADO and DB2 V7.2

Hi,

I am currently facing difficulty displaying chinese, japanese, russian
etc. characters. I am using VB 6 and ADO to query the DB2 Version 7.2
unicode database (UTF-8). The resultset that comes back contains
garbage characters for Chinese, Russian etc languages. The english
characters come back fine using ADO.

It seems that DB2 assumes that my application is NOT Unicode
compliant.

How can I make my application unicode compliant so that MSDASQL.1
makes all the right calls to DB2CLI?
I have tried using IBMDADB2 driver as well but the problem is still
there.

I have tried these things:
1) Setting the DB2CODEPAGE instance variable to 1208.
CLI trace shows that Applicaition code page = 1208 and DB2 Code page =
1208
I would have thought that DB2CLI will not do the code page conversion
as both the application and DB2 code pages are the same.

However, reading the CLI trace carefully revealed that DB2 is binding
the query columns using SQL_C_CHAR instead of SQL_C_WCHAR. According
to the DB2 documentation, for UNICODE applications, DB2 will
automatically bind columns using SQL_C_WHAR, thus preventing any data
loss.

I am completly stuck as to how to make my VB application a "UNICODE"
application so that I can retrieve the data in its UNICODE format and
not in ASCII format. My initial hunch is that DB2 is converting the
data to ANSII while fetching the information from the database. The
resultset that comes back to me is in ASCII format. How can I prevent
this?

I have opened a ticket with IBM but they don't have an answer for me
yet.

Any help is appreciated.

Any ideas!!!

Thanks.

--Daman
Nov 12 '05 #1
1 7507
VB6 automatically converts from its internal unicode representation to ASCII
for all external functions, thus DB2 is being told by VB6 to use ASCII even
when you try to access unicode data. This is a VB6 limitation, not a DB2
issue, and there is no official "workaround" as it is part of the VB6
design.

"Daman" <da********@yahoo.ca> wrote in message
news:f4**************************@posting.google.c om...
Hi,

I am currently facing difficulty displaying chinese, japanese, russian
etc. characters. I am using VB 6 and ADO to query the DB2 Version 7.2
unicode database (UTF-8). The resultset that comes back contains
garbage characters for Chinese, Russian etc languages. The english
characters come back fine using ADO.

It seems that DB2 assumes that my application is NOT Unicode
compliant.

How can I make my application unicode compliant so that MSDASQL.1
makes all the right calls to DB2CLI?
I have tried using IBMDADB2 driver as well but the problem is still
there.

I have tried these things:
1) Setting the DB2CODEPAGE instance variable to 1208.
CLI trace shows that Applicaition code page = 1208 and DB2 Code page =
1208
I would have thought that DB2CLI will not do the code page conversion
as both the application and DB2 code pages are the same.

However, reading the CLI trace carefully revealed that DB2 is binding
the query columns using SQL_C_CHAR instead of SQL_C_WCHAR. According
to the DB2 documentation, for UNICODE applications, DB2 will
automatically bind columns using SQL_C_WHAR, thus preventing any data
loss.

I am completly stuck as to how to make my VB application a "UNICODE"
application so that I can retrieve the data in its UNICODE format and
not in ASCII format. My initial hunch is that DB2 is converting the
data to ANSII while fetching the information from the database. The
resultset that comes back to me is in ASCII format. How can I prevent
this?

I have opened a ticket with IBM but they don't have an answer for me
yet.

Any help is appreciated.

Any ideas!!!

Thanks.

--Daman

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Miki | last post by:
Hi. I have a IIS server with php3 installed. I have SQL server database and data stored in unicode format (nvarchar fields). In header of my php I have the meta: <meta HTTP-EQUIV="content-type"...
1
by: Pettersen, Bjorn S | last post by:
I've been trying to stay blissfully unaware of Unicode, however now it seems like it's my turn. From the outside it seems like a rather massive subject, so any pointers as to where I should _start_...
4
by: Scott Vercuski | last post by:
Hello All, I'm having a problem saving/displaying multiple lanaguages on an ASP page. Here's the general problem I'm having. I have an admin area of a website that allows a user to enter items...
4
by: webdev | last post by:
lo all, some of the questions i'll ask below have most certainly been discussed already, i just hope someone's kind enough to answer them again to help me out.. so i started a python 2.3...
6
by: Bill Nguyen | last post by:
I'm getting data from a mySQL database (default char set = UTF-8). I need to display data in Unicode but got only mongolian characters like this: Phạm Thị Ngọc I changed the textbox font to...
1
by: Sithy | last post by:
Dear All, Currently we are working on a project by using Visual Studio.net as an interface, MS-SQL as data store, and ReportViewer 8 as data view. We want to display our local unicode...
13
by: kev | last post by:
Hi all, I have created a database for equipments. I have a form to register the equipment meaning filling in all the particulars (ID, serial, type, location etc). I have two buttons at the end...
6
by: coldpizza | last post by:
Hi! I am using the built-in Python web server (CGIHTTPServer) to serve pages via CGI. The problem I am having is that I get an error while trying to display Unicode UTF-8 characters via a...
1
by: jackbenimble999 | last post by:
Hello! What is the best way to display a EUC-encoded field with Access 2007? Or, failing that, how do you display a Unicode field as the character instead of the number? Do I need to use a...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.