How do i do ignore case in my where clause

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
dayanand
Posts: 1
Joined: Thu 15 Sep 2011 12:00

How do i do ignore case in my where clause

Post by dayanand » Thu 15 Sep 2011 12:27

I have an issue in doing an ignore case comparision I have tried both .equal and .tolower() both of the methods does not get me the desired results.

Both of these fails to retrieve the results , what is the solution for this

.toUpper
var userArray = from users in userModelEntityContext.USERS_ONLINE
where users.USER_NAME.ToUpper() == username.ToUpper()
select users;

.equal

var userArray = from users in userModelEntityContext.USERS_ONLINE
where users.USER_NAME.Equals(username,StringComparison.OrdinalIgnoreCase)
select users;

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 16 Sep 2011 16:11

1. The first query should work correctly. Anyway, we recommend using the dbMonitor tool that performs per-component tracing of database events such as SQL statement execute etc.
Download link: http://www.devart.com/dbmonitor/dbmon3.exe
Documentation: http://www.devart.com/dotconnect/oracle ... nitor.html

Please check the generated queries and notify us about the results.

2. Which version (x.xx.xxx) of dotConnect for Oracle are you using? You can find it in the Tools > Oracle > About menu of Visual Studio. Does the problem persist with the latest (6.50.214) version of dotConnect for Oracle?

Post Reply