Re: Padding using Type 4 Drivers
From: Carb Simien [MSFT] (CarbinoS_at_online.microsoft.com)
Date: 11/22/04
- Next message: Carb Simien [MSFT]: "RE: Slow response time from Java compared to Query Analyzer"
- Previous message: Utkarsh Mohta: "Slow response time from Java compared to Query Analyzer"
- In reply to: Prithpal: "Re: Padding using Type 4 Drivers"
- Next in thread: Prithpal: "Re: Padding using Type 4 Drivers"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 22 Nov 2004 22:45:51 GMT
--------------------
| From: prithpal.roda@talk21.com (Prithpal)
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| Subject: Re: Padding using Type 4 Drivers
| Date: 17 Nov 2004 01:38:32 -0800
| Organization: http://groups.google.com
| Lines: 54
| Message-ID: <b47276f6.0411170138.2d960a00@posting.google.com>
| References: <b47276f6.0411160840.6acfded0@posting.google.com>
<9aT3U$AzEHA.3956@cpmsftngxa10.phx.gbl>
| NNTP-Posting-Host: 194.72.54.254
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1100684312 31457 127.0.0.1 (17 Nov 2004
09:38:32 GMT)
| X-Complaints-To: groups-abuse@google.com
| NNTP-Posting-Date: Wed, 17 Nov 2004 09:38:32 +0000 (UTC)
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA02.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
.phx.gbl!news-out.cwix.com!newsfeed.cwix.com!newsfeed.yul.equant.net!newsrea
d.com!newsprint.newsread.com!postnews.google.com!not-for-mail
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6480
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| CarbinoS@online.microsoft.com ("Carb Simien [MSFT]") wrote in message
news:<9aT3U$AzEHA.3956@cpmsftngxa10.phx.gbl>...
| > --------------------
| > Hello,
| >
| > It is possible that your SQL Server 7 was using a different
ANSI_PADDING
| > value than what you have set in SQL Server 2000.
| >
| > Whenever you make a connection to SQL Server, you can specify the ANSI
| > settings that you require. If you do not specify these explicitly,
then
| > your connection will receive a default set of ANSI settings based on
the
| > configuration in SQL Server. You can use the Security Audit -> Audit
Login
| > event in SQL Profiler to observe the ANSI settings used when your
| > connection is first made. Your Profiler output may look something like
| > this:
| >
| > -- network protocol: TCP/IP
| > set quoted_identifier on
| > set implicit_transactions off
| > set cursor_close_on_commit off
| > set ansi_warnings on
| > set ansi_padding on
| > set ansi_nulls on
| > set concat_null_yields_null on
| > set language us_english
| > set dateformat mdy
| > set datefirst 7
| >
| > These default settings are documented in the SQL Server Books Online
under
| > the topic "SET"
| >
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts
| > _set-set_40c4.asp) under the subheading "SQL-92 Settings Statements".
You
| > can also run DBCC USEROPTIONS from within your connection to see this
| > information.
| >
| > Are you using the Microsoft JDBC driver or a third-party driver?.
| >
| > 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.
|
| Thanks very much for the information.
|
| We are indeed using a third-party driver as we are not aware of a
| Microsoft Type 4 driver which will connect to sql server 7.
|
| We have performed the tests using a weblogic driver and jtds, both
| having the same results. The DBA insist that the sql server 7 and sql
| server 2000 are configured the same...... but I have my doubts!.
|
In an ealier post, you mentioned upgrading from SQL 7 to SQL 2000. Are you
seeing the same behavior with both database versions?
I did some more research for this question, and here is what I found. For
SQL Server 2000, the ANSI_PADDING setting is applied when the table is
created. If ANSI_PADDING was turned off when the table was created, then
the char(8) column would return the data with trailing spaces removed
(assuming the column allows nulls). If ANSI_PADDING was on when the table
was created, then the char(8) column would return the trailing space. This
behavior can be observed in Query Analyzer:
SET ANSI_PADDING
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_
set-set_2uw7.asp
In another test, I used the Microsoft JDBC driver to query the table that
was created with ANSI_PADDING turned off. I still observe the trailing
spaces in this scenario. I'm not sure why this is the case, but the
behavior appears to be consistent with the other JDBC drivers you have
tested.
All things aside, you should consider using a variable-length data type for
your column definitions if you are concerned with trailing spaces in your
table.
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.
- Next message: Carb Simien [MSFT]: "RE: Slow response time from Java compared to Query Analyzer"
- Previous message: Utkarsh Mohta: "Slow response time from Java compared to Query Analyzer"
- In reply to: Prithpal: "Re: Padding using Type 4 Drivers"
- Next in thread: Prithpal: "Re: Padding using Type 4 Drivers"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|