下面的语句,哪里错了?
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "/1.mdb;Persist Security Info=False "
Conn.CursorLocation = adUseClient
Conn.Open strConn
DBt2 = "select * from 项目管理表 where ADD_MAN= ' " & usernow.id & " ' and PROJ_TYPE= '0 ' "
tree2.Open DBt2, Conn '编译时这里报错 "标准表达式中的数据类型不匹配 "
MsgBox tree2.Fields( "PROJ_NAME ")
请问时哪里的错误,怎样改呢,谢谢
[解决办法]
要声明和定义tree2变量
dim tree2 as ado.recordset
set tree2= new ado.recordset
[解决办法]
也可能是DBt2 = "select * from 项目管理表 where ADD_MAN= ' " & usernow.id & " ' and PROJ_TYPE= '0 ' " 有问题
我是觉得 usernow.id 是从哪得来的?