Case-sensitive collation and queries

  • Thread starter Thread starter Bragadiru
  • Start date Start date
B

Bragadiru

Hi all,

I installed a Ms SQL Server 2000 instance with a case-sensitive collation,
but I have databases with case-insensitive collations. When I try to make a
ExecuteQuery through ADO.NET on case-insensitive database tables I need to
set the CommandText in a case-sensitive manner, otherwise I get error
messages : I have a table named MyTable, if CommandText is "SELECT * FROM
myTable" => error message : object 'myTable' does not exist and "SELECT *
FROM MyTable" works fine.
1. This is the correct behaviour ? Any workaround ? It's hell to remember
exactly the column or table names
2. How can I find the sql server collation ? (programatically)

I'm using .NET Frmw 1.0

Thanks
 
Yup. That's by design. When you choose case-sensitivity ALL objects are also
considered in the string comparisons.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Thnx.

But database case-insensitive setting doesn't ovveride server instance
collation setting ?

Thanks a lot.
 
It should.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top