SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

Nelly
Starting Member

3 Posts

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

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 us...how we can ignore this database's case sensitivity. Or generalise the queries to make it work.

Your help is much appreciated.

Thanks and Regards

Nelly

visakh16
Very Important crosS Applying yaK Herder

India
52249 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
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

Nelly
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

Lamprey
Flowing Fount of Yak Knowledge

4358 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

Nelly
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  
 New 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.06 seconds. Powered By: Snitz Forums 2000