DavidAtWork Posted August 22, 2006 Share Posted August 22, 2006 I've created a web form using ASP.NET 2.0 with Visual Studio 2005 (C# code behinds) that connects to a Oracle 9i DB. I'm trying to set the "email" column of my form to be unique. I set the unique constraint in Oracle, however , I just found out that Oracle , by default, is case sensitive. I also found out that version 9i cannot be changed to case insensitive. Can someone tell me the best way to handle this or direct me to what I should be studying to be able to figure this out? (C#,ASP.NET, SQL statements, Oracle ??)Basically , I want "david" and "David" to be looked at the same way by Oracle and not allow both versions of the same name to be entered.Any direction would be very appreciated.thanks...David Link to comment Share on other sites More sharing options...
pulpfiction Posted August 22, 2006 Share Posted August 22, 2006 I'm not sure of how it can be done in Oracle, but since you are dealing with emails, which are case insensitive. so when the user enters the email initially, before inserting into the database convert it completly to lower case. then incase if you need it for comparison in other places then convert the user entered emial to lowercase and compare it with the email in DB. this might not be right solution, but just give it a try... Link to comment Share on other sites More sharing options...
aspnetguy Posted August 22, 2006 Share Posted August 22, 2006 just use String.ToLower() to make all input lowercase Link to comment Share on other sites More sharing options...
DavidAtWork Posted August 23, 2006 Author Share Posted August 23, 2006 Sounds like a plan. Thanks for the replies.DavidFollow up...Worked just fine...thanks.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now