Showing posts with label driver. Show all posts
Showing posts with label driver. Show all posts

Monday, March 19, 2012

Can the JDBC Driver provided by Microsoft connect MSDE?

I plan to use MSDE because it sues my needs, but doese the
JDBC provided by MS connect to MSDE?
Yes, you can connect to an MSDE instance. You will have to specify the
instance name using the <servername>\<instancename> syntax in your
connection URL.
Carb Simien, MCSE MCDBA MCAD
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
"Benny" <BennyInCanada2883@.hotmail.com> wrote in message
news:13cfc01c412b1$60b8ed60$a101280a@.phx.gbl...
> I plan to use MSDE because it sues my needs, but doese the
> JDBC provided by MS connect to MSDE?

Sunday, February 19, 2012

Can sendStringParametersAsUnicode=false be overriden/changed for certain cases

Configuration: MS SQL server 2005 SP2, and MS jdbc driver version: 1.1
The sendStringParameterAsUnicode has been set to false for performance reasons. However, when inserting unicode data, we would like to override the setting and send the data encoded in unicode, instead of defaulting the whole app to unicode=true and take a performance hit.

Any suggestions? We have tried the cast(? as nvarchar) function, but that did not help.

Sample code/output:
String text = "\u0143\u0144";
sendStringParametersAsUnicode=false
insert into unitable (_ntext) values (?)
Inserting into databse:
143 144 (printed hex values)
Read from database:
3f 3f (printed hex values)

Unicode is the native string representation for communication with SQL Server, if you are converting to MBCS, then you are doing 2 converts for every string. I suggest that if you are concerned with performance, use all Unicode instead of all MBCS.

Hope that helps,

John

|||

Hello,

Sample code will be great in helping to answering this question. I am interested in what API calls are being made to insert and retrieve the data (stmt.execute(), pstmt.setString(), rs.getString(), rs.getCharacterStream(), etc).

Additionally, the following diagnostic information may help:

SQL Server Collation.

SQL Server Machine Language.

Client machine Language.

I'll assume the client and server machines are distinct. Therefore, let's clarify where the data is being improperly converted. After insertion, is the data accurate on the server?

Kind Regards,

Jaaved

|||Details at:
http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?cat=en_us_37eacc47-2e30-4a64-841b-c94b5716569a&lang=en&cr=us&guid=&sloc=en-us&dg=microsoft.public.sqlserver.jdbcdriver&tid=25b3259e-8e4f-4552-808d-15747c8b3fd9&mid=4381b5d6-31c5-49c1-b378-f377205eb5bd&amid=4381b5d6-31c5-49c1-b378-f377205eb5bd&answer=1&p=1&stgxml=http%3a%2f%2fwww.microsoft.com%2fcommunities%2fnewsgroups%2flist%2fen-us%2fsettings.xml
|||I am glad to see this solved on the newsgroups.
Thanks,
Jaaved

Can sendStringParametersAsUnicode=false be overriden/changed for certain cases

Configuration: MS SQL server 2005 SP2, and MS jdbc driver version: 1.1
The sendStringParameterAsUnicode has been set to false for performance reasons. However, when inserting unicode data, we would like to override the setting and send the data encoded in unicode, instead of defaulting the whole app to unicode=true and take a performance hit.

Any suggestions? We have tried the cast(? as nvarchar) function, but that did not help.

Sample code/output:
String text = "\u0143\u0144";
sendStringParametersAsUnicode=false
insert into unitable (_ntext) values (?)
Inserting into databse:
143 144 (printed hex values)
Read from database:
3f 3f (printed hex values)

Unicode is the native string representation for communication with SQL Server, if you are converting to MBCS, then you are doing 2 converts for every string. I suggest that if you are concerned with performance, use all Unicode instead of all MBCS.

Hope that helps,

John

|||

Hello,

Sample code will be great in helping to answering this question. I am interested in what API calls are being made to insert and retrieve the data (stmt.execute(), pstmt.setString(), rs.getString(), rs.getCharacterStream(), etc).

Additionally, the following diagnostic information may help:

SQL Server Collation.

SQL Server Machine Language.

Client machine Language.

I'll assume the client and server machines are distinct. Therefore, let's clarify where the data is being improperly converted. After insertion, is the data accurate on the server?

Kind Regards,

Jaaved

|||Details at:
http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?cat=en_us_37eacc47-2e30-4a64-841b-c94b5716569a&lang=en&cr=us&guid=&sloc=en-us&dg=microsoft.public.sqlserver.jdbcdriver&tid=25b3259e-8e4f-4552-808d-15747c8b3fd9&mid=4381b5d6-31c5-49c1-b378-f377205eb5bd&amid=4381b5d6-31c5-49c1-b378-f377205eb5bd&answer=1&p=1&stgxml=http%3a%2f%2fwww.microsoft.com%2fcommunities%2fnewsgroups%2flist%2fen-us%2fsettings.xml
|||I am glad to see this solved on the newsgroups.
Thanks,
Jaaved