How do i do ignore case in my where clause

How do i do ignore case in my where clause

Postby 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;
dayanand
 
Posts: 1
Joined: Thu 15 Sep 2011 12:00

Postby 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?
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle