改后错误为:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC Microsoft Access Driver] 标准表达式中数据类型不匹配。
程序为下:
<html>
<head>
<title>
使用事务处理方法
</title>
</head>
<%
t1=request.form("t1")
t2=request.form("t2")
t3=request.form("t3")
t4=request.form("t4")
set conn=server.createobject("adodb.connection")
conn.open "Driver=Driver do Microsoft Access (*.mdb);Uid=admin;pwd=;DBQ="&server.MapPath("注册信息.mdb")
str="insert into client (Name,Birthday,Living, Notes,vip)"
str=str&"values('"+t1+"','"+t2+"','"+request.form("r1")+"','"+t3+"','"+t4+"')"
conn.begintrans
conn.execute str
if(t1=" "or t2=" "or t3=" "or t4=" ")then
conn.rollbacktrans
response.write"提交失败"
end if
conn.close
set conn=nothing
%>
</body>
</html>
Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC Microsoft Access Driver] 标准表达式中数据类型不匹配。
程序为下:
<html>
<head>
<title>
使用事务处理方法
</title>
</head>
<%
t1=request.form("t1")
t2=request.form("t2")
t3=request.form("t3")
t4=request.form("t4")
set conn=server.createobject("adodb.connection")
conn.open "Driver=Driver do Microsoft Access (*.mdb);Uid=admin;pwd=;DBQ="&server.MapPath("注册信息.mdb")
str="insert into client (Name,Birthday,Living, Notes,vip)"
str=str&"values('"+t1+"','"+t2+"','"+request.form("r1")+"','"+t3+"','"+t4+"')"
conn.begintrans
conn.execute str
if(t1=" "or t2=" "or t3=" "or t4=" ")then
conn.rollbacktrans
response.write"提交失败"
end if
conn.close
set conn=nothing
%>
</body>
</html>
没有最好只有更好