Look at this: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q316626
Apparently, the guilty party is the SQL-92 standard. Thus, it's not a bug. It's by design. Christopher Reed Web Applications Supervisor Information Technology City of Lubbock [EMAIL PROTECTED] "The oxen are slow, but the earth is patient." >>> [EMAIL PROTECTED] 1:06:40 pm 10/25/2005 >>> Actually, it doesn't matter whether ANSI_PADDING is on or off. All primary key and unique fields cannot have values of "key1" and "key1 " (with the space). Christopher Reed Web Applications Supervisor Information Technology City of Lubbock [EMAIL PROTECTED] "The oxen are slow, but the earth is patient." >>> [EMAIL PROTECTED] 12:50:25 pm 10/25/2005 >>> I think in SQL key fields of type varchar are always trimmed independent of the ANSI_PADDING option. If ANSI_PADDING is ON (the default) non key varchar fields will allow trailing spaces. -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Christopher Reed Sent: Tuesday, October 25, 2005 1:05 PM To: [email protected] Subject: Re: [ADVANCED-DOTNET] Primary Key Bug It just dawned on me what's probably happening. If the column length is fixed (type Char), then all data is padded to fit the column. Thus, "key1" and "key1 " become the same. Likewise, if the column length is variable (type VarChar), then all data is trimmed, so "key1 " becomes "key1". Thus, extra spaces at the end of a string becomes irrelevant. =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
