473,396 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Troubles inserting to a new unicode table....

Hello, I am running DB2 UDB 8.2 on AIX 5.3. I am running some tests
on converting several tables on an existing database to Unicode. The
database will not be converted to unicode...just this table set.

I have successfully set this up and ran some tests using Japanese
characters. The test seemed to work fine. We found during our test
that we needed to install some AIX UTF-8 software for the web-based
user interface to work properly. The following was installed on to
the machine:

bos.loc.com.utf 5.3.0.30 Common Locale Support - UTF-8
bos.loc.utf.EN_US 5.3.0.0 Base System Locale UTF Code
bos.loc.utf.JA_JP 5.3.0.0 Base System Locale UTF Code

After the install we continued our testing to find the Japanese
characters were no longer being inserted into the tables correctly.
The problem seems to occur when the INSERT statement is executed using
EXECUTE IMMEDIATE:

"INSERT INTO TTABLE
(col1,col2,charcol3,col4,col5,col6,col7,col8,col9, col10,col11,col12,col13,charcol14,col15,col16,col1 7)
VALUES
(100,NULL,'Ï€^┴»π^â”´^█π^â”´^â•*Ï€^┬^╧' ,'2007-07-30-21.53.16.000000','2007-07-30-21.53.16.000000',
0,0,2,0,NULL,NULL,NULL,998,'SOMETHING,π^┴^╧π ^┬^╔π^┴^┘',0,NULL,0,NULL)"

The two charcols that contain the data that looks like junk is the un-
emulated Japanese strings (so ignore the junk and pretend it is
real!). That string is executed in this statement string:

EXEC SQL EXECUTE IMMEDIATE :s1;

But, when you look in the table the Japan characters look like blanks
(there is nothing there but it is not null). In the second string you
can see the "SOMETHING," but not the rest of the string that contain
the Japanese characters. As stated above, this worked prior to
installing the utf files.

I can also insert this record from the command line (just as you see
it above) and it works but it just doesnt seem to work any longer
with the EXECUTE IMMEDIATE.

Does anyone know what I may be missing? It seems there is an issue
now with formatting or translating during the execute.

Your help is appreciated.

Jul 31 '07 #1
1 3057
There is a possibility I might have found the reason but I am still
not sure. I read that you need to connect to the database using the
CLI function SQLConnectW() when you are using unicode. Of course,
this brings up more questions and concerns especially since this is
not a unicode database and only a few tables are set as unicode.

Can anyone confirm this?

Next, if this is correct, how do you create a set of userid/password/
schema defines to use in the SQLConnectW() function since it is
expecting double wide character parameters? Is there a CLI function I
am missing that can convert the ANSI strings to a Unicode string?

I just want to make sure this is all correct because it seems like a
management nightmare to keep track of when to connect as ANSI and when
to connect as Unicode.

Last, the current code is set up to connect to the database using EXEC
SQL CONNECT. Is there an option to add to this where it states to
connect as unicode (instead of using the SQLConnectW API )? I am more
curious if you can bypass all the handle calls needed to use
SQLConnectW().

Any possible help is appreciated...it seems sort of messy to do it
this way but we do not want to convert the entire database to unicode
when it is not necessary since the majority of the database would not
need to be unicode.

Aug 3 '07 #2

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

Similar topics

1
by: Rodrigo Benenson | last post by:
Hi! I'm finishing a multiplatform collaborative realtime text editor (something like SubEthaEdit but multiplatform and opensource) develloped using Python+Twisted as a plugin for Leo. Of...
36
by: Ian Rastall | last post by:
I thought I would make a table of the Latin-2 character code. I use a meta tag to indicate ISO-8859-2, but when I use the numeric entity, for, say Latin Capital Letter R With Acute, which is À it...
0
by: Stefan Slapeta | last post by:
Hi all, I've experienced some troubles with message tables and wanted to know if anybody knows a solution for one of them: - If I translate my .mc file into a Unicode .bin file, some of the...
3
by: Al | last post by:
Hello, Sorry for the silly question: How do I insert Check Mark into RichTextBox? I can’t find the ascii code for it. Thanks Alex
10
by: Roger Withnell | last post by:
I'm using ASP, VBScript and SQL Server. I'm also using UTF-8 character set and so my codepage is 65001 and SQL Server datatype nvarchar. I can insert unicode characters correctly into the...
2
by: aacc1313 | last post by:
Hi - with the Jython site being down, info here on the following has been difficult to come by! I'm trying to insert a unicode string into the following table: CREATE TABLE `p1` ( `id` int(11)...
2
by: AlexanderDeLarge | last post by:
Hi! I got a problem that's driving me crazy and I'm desperately in need of help. I'll explain my scenario: I'm doing a database driven site for a band, I got these tables for their discography...
6
by: gita ziabari | last post by:
Hello All, The following code does not work for unicode characters: keyword = dict() kw = 'ÇÅÎÓËÉÈ' keyword.setdefault(key, ).append (kw) It works fine for inserting ASCII character. Any...
3
by: amollokhande1 | last post by:
Hi All, I am using Sql server 2005 as a backend for my application. I want to read/write the unicode data using sql query. When I am using insert into UnicodeData values('سي') command and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
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...

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.