下面的是我做的网页的代码```请说明要加在什么地方哈
=================================================================
<%
' FP_ASP FrontPage 组件自动产生 ASP 。请勿编辑。
On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 936
Err.Clear
strErrorUrl = "sb.asp"
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
Err.Clear
Set fp_conn = Server.CreateObject("ADODB.Connection")
FP_DumpError strErrorUrl, "无法创建连接"
Set fp_rs = Server.CreateObject("ADODB.Recordset")
FP_DumpError strErrorUrl, "无法创建记录集"
fp_conn.Open Application("new_page_11_ConnectionString")
FP_DumpError strErrorUrl, "无法打开数据库"
fp_rs.Open "结果", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
FP_DumpError strErrorUrl, "无法打开记录集"
fp_rs.AddNew
FP_DumpError strErrorUrl, "无法将新记录集添加到数据库"
Dim arFormFields0(1)
Dim arFormDBFields0(1)
Dim arFormValues0(1)
arFormFields0(0) = "name"
arFormDBFields0(0) = "name"
arFormValues0(0) = Request("name")
FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0
If Request.ServerVariables("REMOTE_HOST") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"), "远程计算机名称"
End If
If Request.ServerVariables("REMOTE_USER") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "用户名"
End If
If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"), "浏览器类型"
End If
FP_SaveFieldToDB fp_rs, Now, "时间戳"
fp_rs.Update
FP_DumpError strErrorUrl, "无法更新数据库"
fp_rs.Close
fp_conn.Close
Session("FP_SavedFields")=arFormFields0
Session("FP_SavedValues")=arFormValues0
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
Response.Redirect "cg.asp"
End If
End If
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveDatabase" SuggestedExt="asp" S-DataConnection="new_page_1" S-RecordSource="结果" U-Database-URL="fpdb/new_page_1.mdb" U-Confirmation-Url="cg.asp" U-Validation-Error-Url="sb.asp" S-Builtin-Fields="REMOTE_USER REMOTE_HOST HTTP_USER_AGENT Timestamp" S-Builtin-DBFields="用户名 远程计算机名称 浏览器类型 时间戳" S-Form-Fields="name" S-Form-DBFields="name" U-ASP-Include-Url="_fpclass/fpdbform.inc" startspan -->
<!--webbot bot="SaveDatabase" endspan -->
<p><input type="text" name="name" size="20"></p>
<p><input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></p>
</form>
</body>
</html>
参考资料:突发奇想