Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Case Sensitive database
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

3 Posts

Posted - 11/06/2013 :  09:02:51  Show Profile  Reply with Quote

We have .NET application which access client's database to accomplish certain tasks. We execute all the queries using lower case....all was working fine till now. Now one of our new

client's database is case sensitive.

For instance:

The table name is DocumenTManaGement and column name is FileUploaded.

When we try to retrieve data by using the same queries....its giving the error below:

"Invalid object name 'DOCMAN.DocumenTManaGement '." for table name or "Invalid column name 'FileUploaded'." for column name.

Can anyone please assist we can ignore this database's case sensitivity. Or generalise the queries to make it work.

Your help is much appreciated.

Thanks and Regards


Very Important crosS Applying yaK Herder

52326 Posts

Posted - 11/06/2013 :  09:04:58  Show Profile  Reply with Quote
make collation as case insensitive. use ALTER DATABASE ..COLLATE statement for that

SQL Server MVP
Go to Top of Page

Starting Member

3 Posts

Posted - 11/06/2013 :  09:11:25  Show Profile  Reply with Quote
Thank you Visakh for your answer.

They not allowing us to create another instance of the database!! same as they not allowing us to alter the database collation.

any other suggestions?
Go to Top of Page

Flowing Fount of Yak Knowledge

4614 Posts

Posted - 11/06/2013 :  12:33:39  Show Profile  Reply with Quote
I don't know what your application does or why it would lower-case things. But, I don't think there is a good solution for that on the SQL side of things. You could query the schema information and you can match that by specifying the collation. But, that would require you to query the schema information every time for every table to get the correct casing for each table and column name in that database.

The obvious alternative is to adjust your application to handle it or ask the client to change their DB or walk away from the project if it is going to cost you too much money to adjust your app.
Go to Top of Page

Starting Member

3 Posts

Posted - 11/06/2013 :  13:30:33  Show Profile  Reply with Quote
Thanks for your suggestions Lamprey.

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000