473,508 Members | 4,753 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL Server Overrides My ANSI_PADDING Setting

Bob
I used Enterprise Manager to change the data type of one table column
from one thing to another. When I attempted to save the change, I was
warned that "one or more existing columns have ANSI_PADDING 'off' and
will be re-created with ANSI_PADDING 'on'". I didn't expect to see
this message. I verified that ANSI_PADDING is 'off' at the database
level by running the following statement:

SELECT DATABASEPROPERTYEX('database', 'IsAnsiPaddingEnabled')

Further, the ANSI padding option on the Connections tab of the SQL
Server Properties window is not selected. If ANSI_PADDING is 'off' at
the database level, why does SQL Server assume I want to re-create a
column with ANSI_PADDING 'on'?
Jul 20 '05 #1
1 7058
Bob (bo******@enron.com) writes:
I used Enterprise Manager to change the data type of one table column
from one thing to another. When I attempted to save the change, I was
warned that "one or more existing columns have ANSI_PADDING 'off' and
will be re-created with ANSI_PADDING 'on'". I didn't expect to see
this message. I verified that ANSI_PADDING is 'off' at the database
level by running the following statement:

SELECT DATABASEPROPERTYEX('database', 'IsAnsiPaddingEnabled')

Further, the ANSI padding option on the Connections tab of the SQL
Server Properties window is not selected. If ANSI_PADDING is 'off' at
the database level, why does SQL Server assume I want to re-create a
column with ANSI_PADDING 'on'?


Because ANSI_PADDING is the default, and you should stick to it,
unless you have actually have reasons not to. To wit, there are
features in SQL Server you cannot use with ANSI_PADDING off. (Indexed
views and indexes on computed columns.)

The setting on database level is by no means any final say. There are
many ways to control a setting, and SET command always wins. Mainly
they are useful if you have legacy apps that is using DB-Library or
some other client library that does not set ANSI_PADDINGS, and other
ANSI settings by default. By turning on ANSI_PADDING for the database,
you can still get this behaviour if you desire.

But if you want ANSI_PADDING to be off, then you have to take steps
in your application and elsewhere to enforce this.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
595
by: Niyazi | last post by:
Hi, I have BIG question and I gues it is the BEST question. I have a problem that I am guessing the best solution is to create some sort ..NET Services. This Service(s) must check every...
1
3352
by: | last post by:
Hi, I am loading some crystal reports in a method similar to this (see below). And set the cursor to waiting while the reoprt is loaded, run and shown. BUT while the report is running the cursor...
4
1961
by: clintonG | last post by:
Technically speaking, this issue is not about modifying the HTML generated by server controls but preceding the HTML generated by server controls with an HTML control generated on the basis of the...
1
1405
by: Calvin Slater | last post by:
It is recommended that the following settings be set for all connections so that the optimizer will perform well on indexed views and stuff. SET QUOTED_IDENTIFIER ON SET ARITHABORT ON SET...
2
2140
by: Will Rickards | last post by:
In my web application there is an interactive report. Then there need to be a printable version a pdf. So I found this java tool csstoxslfo and the java fop tool from apache that will take my...
1
1180
by: DraguVaso | last post by:
Hi, I want to create a Service that Reads and Write Files, and Insert and Select Data from a Sql Server Database. I did a little test with a small Service that I wanted to write something to...
2
4900
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
2
1039
by: Neal | last post by:
Hi All, I have VS 2005 Pro and when inheriting a class in 2003 the drop down combobox at the top of the IDE's text editor showed the overrides + the Events for the class. However in 2005 it just...
8
4054
by: Martin | last post by:
Hi all, I'm trying to make a subclass of the Textbox. One of the things I did there is the following: Protected Overrides Sub OnLeave(ByVal e As System.EventArgs) If Me.DataType = 1 Or...
0
7228
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7128
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7058
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5635
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.