嵌套SQL无法调用,该如何解决
嵌套SQL无法调用VBScript codeset rsserver.CreateObject(adodb.recordset)rs.open select * from tab
嵌套SQL无法调用
VBScript codeset rs=server.CreateObject("adodb.recordset") rs.open "select * from table",conn,1,1 do while not rs.eof set rs1=server.CreateObject("adodb.recordset") rs1.open "select * from '"&rs("data_name")&"'",conn,1,1
运行到这里就报“错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC 驱动程序不支持所需的属性。”
下面是这个表
table
id data_name time
1 book 2012
2 jpg 2012
3 jpg_2 2011
[解决办法] rs1.open "select * from '"&rs("data_name")&"'",conn,1,1
from后面怎么可以加单引号呢
rs1.open "select * from "&rs("data_name"),conn,1,1