有一表 student有學號,姓名2列有textbox1,textbox2,button控件3個參數 a,b,c;a,b為textbox1,textbox2 的控件返回值, 設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 ) 為什么不行(通過學號或名字查信息)再加個問題,gridview 數據源為SqlDataSource1 ,有辦法使點按鈕1時數據源為SqlDataSource1,而點按鈕2時數據源為SqlDataSource2嗎?或者 按不同按鈕時 SqlDataSource 的SelectCommand發生變化,謝謝
VS2008 gridview 查詢的2個問題
慕的地8271018
2018-11-13 05:02:07