我也有一个类似的问题<%@ Import NameSpace="System.Data" %> <%@ Import NameSpace="System.Data.OleDb" %><% Response.Expires=0 %>
程序代码:
<SCRIPT language=VB Runat=\"Server\">
dim DSN as String
dim tsql as String = \"select *From UserDatas\"
sub page_Load (obj as object, e as EventArgs)
DSN=\"Provider=Microsoft.JET.OLEDB.4.0;Data Source = \" & _
Server.MapPath(\"/ASP/ASP.mdb\") & \";\"
ShowResultSet(DSN,tsql)
end sub
sub button1_click(obj as object, e as eventargs)
dim lret as boolean=false
tsql=\"insert into UserDatas(UserAaccount,UserPWD.UserName,EMail)\"
tsql=tsql &\"values (' \"& request.form(\"UserAccount\")&\" ',\"
tsql=tsql & \" ' \" & request.form(\"Userpwd\") & \" ',\"
tsql=tsql & \" ' \" & request.form(\"UserName\") & \" ',\"
tsql=tsql & \" ' \" & request.form(\"EMail\") & \" ') \"
dim Counts as integer
Counts=opCommand(DSN,tsql)
if Counts >0 then
response.redirect(\"ddd.aspx\")
else
Show1.InnerHtml=\"数据操作命令执行失败!\"
endif
END DUB
<%@ Import NameSpace=\"System.Data\" %><%@ Import NameSpace=\"System.Data\" %> <%@ Import NameSpace=\"System.Data.OleDb\" %><% Response.Expires=0 %>
添加用户注册信息
<%@ Import NameSpace=\"System.Data.OleDb\" %><% Response.Expires=0 %>