两面三刀代表什么生肖:Microsoft JET Database Engine (0x80040E07) asp

来源:百度文库 编辑:神马品牌网 时间:2024/04/28 19:47:31
Microsoft JET Database Engine (0x80040E07) 标准表达式中数据类型不匹配。请高手指教!
set rst2=server.CreateObject("adodb.recordset")
rst2.Open "select * from style where style1="& rst("mem_id") &";",con
if not(rst2.eof and rst2.bof) then
rst2("access5")=1
rst2.update
End If
rst2.close
con.close
response.write "success"
End if

你方法有误给你看个代码

DataName = "Data/Data.mdb" '数据库名
Set conn = Server.CreateObject("ADODB.Connection")
Connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(DataName)
conn.open Connstr

需要执行查询的时候是
Dim sqlEx
sqlEx = "select * from Admin where ID=" & Request("Id")
set rs=conn.execute(sqlEx)
end if

这样rs自动是 ADODB.RecordSet 类型,连接数据库的放在单独文件里比如 conn.asp