C#使用Tableadapter进行变量的模糊查询

在Tableadapter里面用'%'+@x+'%',应该是不行的,经过了测试,

有两种解决办法,

1种是:通过存储过程,参见:

http://forums.asp.net/t/1390313.aspx

1种是通过类似,WHERE CharIndex(@x, book_info.图书名称) > 0 的方法,

参见:

http://q.cnblogs.com/q/46529/

posted @ 2013-02-05 22:00  绝对菜鸟  阅读(1994)  评论(0编辑  收藏  举报