如何通过TEXT输入复制表名称??请高手赐教
CDOname = Text1.Text '两个表的名字,通过TEXT输入表的名字,复制CDOname到CDNname。按照下面的写会出现“查询语句不完整”的错误。CDNname = Text2.Text
'Debug.Print CDOname
'Debug.Print CDNname
newsql = "select * into '" & CDNname & "' from '" & CDOname & "'"
With Adodc1
.CommandType = adCmdText
.Recordset.ActiveConnection.Execute = newsql
End With
--------------------编程问答-------------------- newsql = "select * from '" & CDNname & "' from '" & CDOname & "'" --------------------编程问答-------------------- ...不好意思看错了.. --------------------编程问答-------------------- SQL = "select * into " & CDNname & " from " & CDOname & ""
应该这样写..不然会多一个单引号...你调试一下就知道了...
不好意思啊..一时冲动看错了..HOHO..
补充:VB , 数据库(包含打印,安装,报表)