忽略案例搜索功能 [英] Ignore case search functinality

查看:63
本文介绍了忽略案例搜索功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在具有Nhibernate框架的项目中具有搜索功能,

传递搜索值时,例如可以忽略大小写

如果"CodeProject"在数据库中,

如果我像%Co%"一样通过,它将向我发送结果"CodeProject",但如果我像%co%"一样通过,则向我发送null

We have a search functionality in a project with Nhibernate framework,

when passing the value for search is it possible to ignore case for example

If "CodeProject" is in database ,

if i pass like "%Co%" it sends me the result "CodeProject" , but if i pass "%co%" it sends me null

推荐答案

尝试转换大小写相同的文件..例如,请参见下面的查询:

Try to convert case of the filed in same case.., for example see the below Query:

"select text from mytable upper(text)=''" + txtSearch.Text.ToUpper() + "''";


这篇关于忽略案例搜索功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆