Re: MSSQL Server 2005 Unicode Support and EOF

2006-08-02 Thread Anjo Krank

a) post a bug report, wait a year, then chose option two or three
b) install Project Wonder, look at how we do it the ERXJDBCAdaptor,  
which gets patched into the runtime.
c) or subclass the MicrosoftPlugIn, use  
JDBCPlugin.setPlugInNameForSubprotocol 
("com.somewhere.MyMicrosoftPlugIn", "sqlserver") to patch it into the  
system (before a model gets loaded). You might need to remove the  
plugin key from your connection dict for this to work.


Cheers, Anjo

Am 02.08.2006 um 12:36 schrieb Webobjects:

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?


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


RE: MSSQL Server 2005 Unicode Support and EOF

2006-08-02 Thread Webobjects
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'');

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  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: MSSQL Server 2005 Unicode Support and EOF

2006-07-31 Thread Peter Vandoros


That seems a bit weird. I have successfully tested MSSQL 2000 with 
Unicode characters but i didn't come across the problem you are facing. 
I don't think i was doing anything special either in terms of the jdbc url.


Which version of the drivers are you using? Have you looked around the 
net to similar problems?


regards,

Peter

Dov Rosenberg wrote:
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*'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  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/peter%40etechgroup.com.au

This email sent to [EMAIL PROTECTED]

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com