JDBC for SQL Server 2000 from M$, this JDBC is not for international users, no encoding can somewhere be added

JDBC for SQL Server 2000 from M$, this JDBC is not for international users, no encoding can somewhere be added

Post by Brian Cho » Sat, 24 Nov 2001 02:37:59



I was so delighted for the first JDBC driver for MSSQL from M$.
(http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?...)

But the happiness fades very soon after I found that the Chinese
charcter I put into
or grab from the database becomes funny characters.

I have spent a few hours decompiled and trace the JDBC driver, and found
that it
was by design ignored the possibility for retrieving non-ASCII data from
MSSQL,
it just simply convert the byte into char:

class com.microsoft.util.UtilDataConversions line 20 (as decompiled by
JAD)
    stringbuffer.append((char)(abyte0[j] & 0xff));
where abyte is the raw data from SQL Server

To make it cope with double byte characters must requires a massive
rewrite of
code. So for those non-ASCII users, either wait for the new core JDBC
driver
from Microsoft, or use other third-party costy JDBC type 4 drivers.

Actually quite disappointed for this poor-designed driver from M$, such
a big
company but release such a bad stuff, how can they (or the company where
M$
buy this stuff from) design a JAVA without even consider the i18n issue?

And also, despite the i18n issue, the performance is not good as well,
compare
to the JDBC type 4 driver "i-net SPRINTA?" from
http://www.inetsoftware.de,
the speed is really very slow, mainly because of the bulkiness of the
whole
driver.

Regards,
Brian Chow

 
 
 

JDBC for SQL Server 2000 from M$, this JDBC is not for international users, no encoding can somewhere be added

Post by John Redwoo » Sat, 24 Nov 2001 23:25:22


Brian,

I picked up some rumours that the final driver will indeed support this.

Last week we bought the new DataDirect Connect 2.2 JDBC driver.
We are also working in an international environment, so we have to cope with
a whole set of different codepage based data.
That's part of the reason why we got the real DataDirect driver; it supports
unicode, double-byte, and multi-byte support.

Quote:> And also, despite the i18n issue, the performance is not good as well,
> compare
> to the JDBC type 4 driver "i-net SPRINTAT" from
> http://www.inetsoftware.de,
> the speed is really very slow, mainly because of the bulkiness of the
> whole
> driver.

The new DD driver outperforms any other Type4 SQLServer driver that we
tested (also the I-Net Sprinta) and is cheaper then the I-Net one.
Better performance, more functionality and cheaper => I was happy with the
driver and my manager was happy with the price.

Here is a link if you want more info:
http://www.datadirect-technologies.com/jdbc/connectjdbc/featuresummar...

JR


Quote:> I was so delighted for the first JDBC driver for MSSQL from M$.

(http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?...
SDN-FILES/027/001/779/msdncompositedoc.xml)

> But the happiness fades very soon after I found that the Chinese
> charcter I put into
> or grab from the database becomes funny characters.

> I have spent a few hours decompiled and trace the JDBC driver, and found
> that it
> was by design ignored the possibility for retrieving non-ASCII data from
> MSSQL,
> it just simply convert the byte into char:

> class com.microsoft.util.UtilDataConversions line 20 (as decompiled by
> JAD)
>     stringbuffer.append((char)(abyte0[j] & 0xff));
> where abyte is the raw data from SQL Server

> To make it cope with double byte characters must requires a massive
> rewrite of
> code. So for those non-ASCII users, either wait for the new core JDBC
> driver
> from Microsoft, or use other third-party costy JDBC type 4 drivers.

> Actually quite disappointed for this poor-designed driver from M$, such
> a big
> company but release such a bad stuff, how can they (or the company where
> M$
> buy this stuff from) design a JAVA without even consider the i18n issue?

> And also, despite the i18n issue, the performance is not good as well,
> compare
> to the JDBC type 4 driver "i-net SPRINTAT" from
> http://www.inetsoftware.de,
> the speed is really very slow, mainly because of the bulkiness of the
> whole
> driver.

> Regards,
> Brian Chow



 
 
 

JDBC for SQL Server 2000 from M$, this JDBC is not for international users, no encoding can somewhere be added

Post by Brian Cho » Tue, 27 Nov 2001 12:48:40


Hi John,


> I picked up some rumours that the final driver will indeed support this.

I hope so, afterall, it is free (at lease until beta phase), but I am afraid
that
they need to modify a lot of core codes, and potentially caused lots of bugs
when doing so...

Quote:> Last week we bought the new DataDirect Connect 2.2 JDBC driver.
> We are also working in an international environment, so we have to cope with
> a whole set of different codepage based data.
> That's part of the reason why we got the real DataDirect driver; it supports
> unicode, double-byte, and multi-byte support.

I have tested many JDBC type 4 driver as well, INet Sprinta and Merlia,
(TW)FreeTDS, Tave Avenir and DataDirect too. Sprinta's performance
is really not bad, I haven't really tried DataDirect, because it warn me
[MERANT][SQLServer JDBC Driver]This driver is locked for use with embedded
applications.
and I simply can't make it work, so I have gave up and turns to Sprinta.

Quote:> The new DD driver outperforms any other Type4 SQLServer driver that we
> tested (also the I-Net Sprinta) and is cheaper then the I-Net one.
> Better performance, more functionality and cheaper => I was happy with the
> driver and my manager was happy with the price.

May I ask you a question? I saw some DLL inside the package and saw that
it is for stored proc, can I run stored proc without these DLL?

Thanks for your reply too :)

Regards,
Brian Chow

 
 
 

1. JDBC for SQL Server 2000 from M$, this JDBC is not for international users, no encoding can somewhere be added

I was so delighted for the first JDBC driver for MSSQL from M$.
(http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?...
SDN-FILES/027/001/779/msdncompositedoc.xml)
But the happiness fades very soon after I found that the Chinese charcter I
put into
or grab from the database becomes funny characters.

I have spent a few hours decompiled and trace the JDBC driver, and found
that it
was by design ignored the possibility for retrieving non-ASCII data from
MSSQL,
it just simply convert the byte into char:

class com.microsoft.util.UtilDataConversions line 20 (as decompiled by JAD)
    stringbuffer.append((char)(abyte0[j] & 0xff));

To make it cope with double byte characters must requires a massive rewrite
of
code. So for those non-ASCII users, either wait for the new core JDBC driver
from Microsoft, or use other third-party costy JDBC type 4 drivers.

Actually quite disappointed for this poor-designed driver from M$, such a
big
company but release such a bad stuff, how can they (or the company where M$
buy this stuff from) design a JAVA without even consider the i18n issue?

And also, despite the i18n issue, the performance is not good as well,
compare
to the JDBC type 4 driver "i-net SPRINTA?" from http://www.inetsoftware.de,
the speed is really very slow, mainly because of the bulkiness of the whole
driver.

Regards,
Brian Chow

2. jBASE restructuring just announced

3. vERYnew, class cdc help???

4. i also am having problems connecting with MS JDBC driver for sql2k

5. upgrades from 7.13 UC1

6. UPDATETEXT problem with MS SQL Server 2000 JDBC

7. Oracle 9iAS install problem

8. JDBC Connection to MS SQL Server 2000

9. queryDataSet.execute()+ms jdbc driver+sql server 2000

10. Compatibility JDK 1.4.0 with JDBC Driver for MS SQL Server 2000

11. How to use MS SQL server 2000 JDBC driver in AIX

12. MS SQL Server 2000 Driver for JDBC