Perhaps 
http://www.wodeveloper.com/omniLists/webobjects-talk/2004/January/msg00018.html
may give some hints how to patch the SQL in the desired way.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Dov Rosenberg
Sent: Monday, July 31, 2006 8:54 PM
To: WebObjects Dev
Subject: MSSQL Server 2005 Unicode Support and EOF


We have come across an issue supporting MSSQLServer 2005 and unicode languages 
in our WO/WOF based application. Our app has the ability to store multiple 
languages in a single database. In Oracle we use an AL32UTF8 character 
collation sequence and everything works fine. For SQL Server it appears that 
the only way I can store unicode characters in a table is that the columns need 
to be of type nchar, ntext, or nvarchar and a hint needs to be included in the 
INSERT or UDPATE clause that tells SQL Server that the string is a unicode 
string. For example:


For the following table
CREATE TABLE [CONTENTDATA] ( 
    [RECORDID]    nvarchar(64) NOT NULL,
    [XML]         ntext NULL,
    CONSTRAINT [PK_CONTENTDATA] PRIMARY KEY([RECORDID])
)


insert into CONTENTDATA (RECORDID, XML) values (newid(), N'附属原爆後障害医療研究施設');

In case the japanese characters didn’t come thru the mail list:
insert into CONTENTDATA (RECORDID, XML) values (newid(), N'<some unicoded 
string>');

Notice the N in front of the string – that tells SQL Server to store it as 
unicode for the nchar, ntext, and nvarchar columns (not sure why it wouldn’t do 
that automatically for those datatypes). It appears that if I do an INSERT 
using the above notation the only way I can retrieve the data is appending the 
N into the qualifier as well. For example:

select * from CONTENTDATA where XML like N'附属原%'; <-- will retrieve the record 
inserted above
select * from CONTENTDATA where XML like '附属原%';  <-- will NOT retrieve the 
record inserted above

QUESTION: How/where can I modify the JDBC Plugin for EOF to adjust the way it 
generates the INSERT and UPDATE clauses of the outgoing SQL? 
QUESTION: How can I modify the JDBC Plugin to do the SELECT qualifiers?


-- 
Dov Rosenberg
Inquira
Knowledge Management Experts
http://www.inquira.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to