473,689 Members | 2,940 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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,char col3,col4,col5, col6,col7,col8, col9,col10,col1 1,col12,col13,c harcol14,col15, col16,col17)
VALUES
(100,NULL,'π^ »π^┴^█ ^┴^*π^┬ ^╧','2007-07-30-21.53.16.000000 ','2007-07-30-21.53.16.000000 ',
0,0,2,0,NULL,NU LL,NULL,998,'SO METHING,π^┴^ ╧π^┬^╔π ^┴^┘',0,NUL L,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 3069
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...i t 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
1683
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 course as the software run in different platforms in different places, text encoding compatibility is an issue. So the obvious choice was Tkencoding for client gui, unicode for system internals and utf-8 for web outputs. But I'm getting serious...
36
2835
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 gives me the ISO-8859-1 character (either that or the UTF-8 character, which would be the same thing, I imagine.) I'm curious about this. I've pretty much given up the project at this point, but I'm wondering what it is I'm not seeing. I can...
0
1357
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 chars are afterwards returned incorretly by FormatMessage (which is not the case if the .bin output is ANSI! - very strange). I've experienced this with some german chars like ,,.
3
32339
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
12292
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 database table using INSERT.... (field1) ...VALUES ......... (N'Characters'). How do I do this using Rs.Update viz-a-viz:
2
2753
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) NOT NULL auto_increment, `description` text, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 I'm using jython's zxJDBC classes
2
3079
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 section: Discography --------------------- DiscID
6
3893
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 suggestion?
3
6878
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 if we view the data using sql query analyser, it shows ??. On the otherhand, when i insert the same unicode data through sql enterprize manager simply copying the data in the actual field, it properly stores the data.
0
9076
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8947
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8783
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8786
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4321
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2965
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 we have to send another system
2
2219
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1952
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.