2013-12-20 62 views
0

filteredrows = Server_Tables [i] .Select(「(TRIM(Tool Stored Place and Sheduled)='」+ searchtext +「')OR(TRIM(連接數據集的工作組服務器) tool)='「+ searchtext +」')「);從數據表中選擇一行時出錯

在執行時,我得到「語法錯誤:'Stored'操作符後缺少操作數。」

回答

0

這似乎有點不可思議,但如果你真的有一個名爲如上然後兩個列的表述應該是:

filteredrows = Server_Tables[i].Select("TRIM([Tool Stored Place and Sheduled])='" + 
     searchtext + "' OR TRIM([Workgroup server to connect to dataset within the tool])='" + 
     searchtext + "'"); 

而這隻有當您的SEARCHTEXT變量不包含任何單引號。
由於列名中存在空格,因此需要列名稱周圍的方括號

相關問題