0
如何計算與where子句和WHERE條件應該從文字框數與where子句和WHERE條件應該從文字框
select Count(SRNO) from [Visitor_Customer] where [month]= & me.textBox1.text
這個代碼不工作
請幫助....
如何計算與where子句和WHERE條件應該從文字框數與where子句和WHERE條件應該從文字框
select Count(SRNO) from [Visitor_Customer] where [month]= & me.textBox1.text
這個代碼不工作
請幫助....
試試這個
"select Count(SRNO) from [Visitor_Customer] where [month]= "& me.textBox1.text
你不能相信的文本框的內容,所以你需要準備的語句研究所元首。只要問'鮑比表'。此頁面可能有所幫助:http://msdn.microsoft.com/zh-cn/library/system.data.sqlclient.sqlcommand.prepare.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1 –
從[Visitor_Customer] where [month] ='「+ me.textBox1.text +」'「OR 」select [Countitor(SRNO)from [Visitor_Customer] where [month] ='「& me.textBox1.text&「'」 – Amit
@megha請檢查這個URL,它會幫助你接受答案或提供給我電子郵件ID,我會解釋如何接受答案 http://meta.stackexchange.com/questions/23138 /如何接受堆棧溢出回答 – Amit