Mr. Vishwas
Mr. Vishwas

Reputation: 11

How to make my local SQL Server database case sensitive in Visual Studio 2015?

I have a database in my asp.net web project. I'm using SSDT for Visual Studio 2015 to add local database to my web project. I have tables and stored procedures in my database _logdb.

My problem is this my database isn't 'case sensitive' and it isn't distinguishing b/w upper, lower or camel case due to this I'm facing some problem in ADO.NET coding. When I see the property of database it showing that "case sensitive :False".

Can anyone tell me how can I make my database case sensitive?

property of my db

enter image description here

I have read out many post regarding my problem but nothing helped and I'm new here so if I missed anything please let me know. Thank you.

Upvotes: 0

Views: 1567

Answers (3)

Steven Green
Steven Green

Reputation: 3517

The database collation setting controls case sensitivity in SQL Server. When using a SQL Server database project in Visual Studio, you can select the desired database collation by opening the database project's Properties tab and then, on the Project Settings page, clicking on the Database Settings button.

Upvotes: 0

Andrew O'Brien
Andrew O'Brien

Reputation: 1823

You can configure the instance collation which would require dropping the databases before changing it. Here is a link to setting or changing the Server Collation.

You can also do this on a database level. Here is information on setting or changing collation on the database level.

You may also want to read the collation clause which can also be applied to tables, columns, and casting expressions among additional options.

Upvotes: 1

Gi1ber7
Gi1ber7

Reputation: 682

Did you tried ALTER DATABASE "db-name" COLLATE Latin1_General_CS_AS?

Upvotes: 0

Related Questions