ASP往Access数据库里添加数据,不报任何错误,但是数据库中没数据。
<%@LANGUAGE="VBSCRIPT"CODEPAGE="65001"%><!--#includefile="conn.asp"--><!DOCTYPEhtmlPU...
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
set rs=Server.CreateObject("adodb.recordset")
UserName=request.form("UserName")
Position=request.form("Position")
Department=request.form("Department")
Mobile=request.form("Mobile")
Email=request.form("Email")
Company=request.form("Company")
CompanyVocation=request.form("CompanyVocation")
Website=request.form("Website")
CompanyAddress=request.form("CompanyAddress")
PhonePart1=request.form("PhonePart1")
PhonePart2=request.form("PhonePart2")
Comment=request.form("Comment")
sql="select * from userInfo"
rs.open sql,conn,3,3
rs.addnew
rs("UserName")=UserName
rs("Position")=Position
rs("Department")=Department
rs("Mobile")=Mobile
rs("Email")=Email
rs("Company")=Company
rs("CompanyVocation")=CompanyVocation
rs("Website")=Website
rs("CompanyAddress")=CompanyAddress
rs("PhonePart1")=PhonePart1
rs("PhonePart2")=PhonePart2
rs("Comment")=Comment
rs.update
application.unLock()
rs.close
set rs=nothing
conn.close
set conn=nothing
response.Write("- -")
response.End(exec)
%> 展开
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
set rs=Server.CreateObject("adodb.recordset")
UserName=request.form("UserName")
Position=request.form("Position")
Department=request.form("Department")
Mobile=request.form("Mobile")
Email=request.form("Email")
Company=request.form("Company")
CompanyVocation=request.form("CompanyVocation")
Website=request.form("Website")
CompanyAddress=request.form("CompanyAddress")
PhonePart1=request.form("PhonePart1")
PhonePart2=request.form("PhonePart2")
Comment=request.form("Comment")
sql="select * from userInfo"
rs.open sql,conn,3,3
rs.addnew
rs("UserName")=UserName
rs("Position")=Position
rs("Department")=Department
rs("Mobile")=Mobile
rs("Email")=Email
rs("Company")=Company
rs("CompanyVocation")=CompanyVocation
rs("Website")=Website
rs("CompanyAddress")=CompanyAddress
rs("PhonePart1")=PhonePart1
rs("PhonePart2")=PhonePart2
rs("Comment")=Comment
rs.update
application.unLock()
rs.close
set rs=nothing
conn.close
set conn=nothing
response.Write("- -")
response.End(exec)
%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询