如果其它都没问题,那就是select写错了。我遇到过一次。

解决方案 »

  1.   

    "SELECT ["+Tana+"].* FROM ["+Tana+"] where cxyj.SelectedItem.Text=List1.SelectedItem.Text"SQL 语句哪有这样的写法??cxyj.SelectedItem.Text  这是程序中的写法,不是SQL语句
      

  2.   

    Dim queryString As String = "SELECT ["+Tana+"].* FROM ["+Tana+"] where cxyj.SelectedItem.Text=List1.SelectedItem.Text"
    ==============
    我可能见识太少,语句中的"["、"]"是什么意思?where 后面怎么能直接使用cxyj.selecteditem.text ?
    --------------
    我估计 where 后面的应该这样写吧:
    "select * from table_name where x = '"& list1.selecteditem.text &"'"
    另外,怎么连 from 后面的“表名”都 “变量” 化了?where 后面的所有表达式也是“变量”化的?如此众多的变量,这个... ...
    --------------
    sql语句里面,有些不能变量化的。
      

  3.   

    "selecct * from " + Tana + " where " +  cxyj.SelectedItem.Text + "=" + List1.SelectedItem.Text