有一表 student有學(xué)號(hào),姓名2列有textbox1,textbox2,button控件3個(gè)參數(shù) a,b,c;a,b為textbox1,textbox2 的控件返回值, 設(shè)c值為%為什么select * from table where name like %@b% 不可以查詢,而select * from table where name like @c+@b%+@c 就可以呢還有 select * from table where (name = @c+@b%+@c OR num=@a ) 為什么不行(通過(guò)學(xué)號(hào)或名字查信息)再加個(gè)問(wèn)題,gridview 數(shù)據(jù)源為SqlDataSource1 ,有辦法使點(diǎn)按鈕1時(shí)數(shù)據(jù)源為SqlDataSource1,而點(diǎn)按鈕2時(shí)數(shù)據(jù)源為SqlDataSource2嗎?或者 按不同按鈕時(shí) SqlDataSource 的SelectCommand發(fā)生變化,謝謝
VS2008 gridview 查詢的2個(gè)問(wèn)題
慕的地8271018
2018-11-13 05:02:07