一各ASP网站表单提交的问题,请大师们帮助!

meok 2003-08-14 12:54:37
我的问题是我写完的表单不能提交,总是提示错误,我的程序源代码在http://gmlt.net/test.rar,谁能帮我测试一下呀!!感谢给分!
...全文
23 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
ceocio 2003-08-14
  • 打赏
  • 举报
回复
哪里错了你就把那一部分的代码帖出来,我们直接线上帮你看。
akak 2003-08-14
  • 打赏
  • 举报
回复
你的源程序那么长,又不说出错在那里,谁有空去把你的看完呀,大家都要上班的,不过看你
Microsoft JET Database Engine (0x80040E14)
是不是数据连接出错了
meok 2003-08-14
  • 打赏
  • 举报
回复
我不会ASP,只好用DW,但我没设定表单校验,是校验的问题么,是否有可能是软件的毛病,可是我用了很久了,这几天刚出的毛病
gtbear 2003-08-14
  • 打赏
  • 举报
回复
用DeamweaverMX的插件做表单校验都是垃圾,你真不负责任。
lang11zi 2003-08-14
  • 打赏
  • 举报
回复
too long
possible_Y 2003-08-14
  • 打赏
  • 举报
回复
The command contained one or more errors
meok 2003-08-14
  • 打赏
  • 举报
回复
错误类型:
Microsoft JET Database Engine (0x80040E14)
/in.asp, 第 115 行


浏览器类型:
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

页:
POST 210 bytes to /in.asp

POST 数据:
bt=%BB%B9%CA%C7%B8%BA%B5%E7%BA%C9&nr=%B7%A8%B9%FA%E8%F3%B5%D9%B8%D4&name=%B8%F7%B4%F3%B9%FA&email=123@163.com&add=%B6%D4%B7%BD%CA%C7%B8%F6%BA%CF%CA%CA%B5%C4%B7%E7%B8%F1%BA%CD&Submit=%CC%E1%BD%BB&MM_in . . .

时间:
2003年8月14日, 13:25:30



<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/test.asp" -->
<%
' *** Edit Operations: declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) = "form1") Then

MM_editConnection = MM_test_STRING
MM_editTable = "news"
MM_editRedirectUrl = "index.asp"
MM_fieldsStr = "bt|value|nr|value|name|value|email|value|add|value"
MM_columnsStr = "bt|',none,''|nr|',none,''|name|',none,''|email|',none,''|add|',none,''"

' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")

' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next

' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If

End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it

Dim MM_tableValues
Dim MM_dbValues

If (CStr(Request("MM_insert")) <> "") Then

' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"

If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>

<body>
<p> </p>
<p> </p>
<table width="500" border="1" align="center">
<tr>
<td><form action="<%=MM_editAction%>" method="POST" name="form1" onSubmit="MM_validateForm('bt','','R','name','','R','email','','RisEmail','add','','R','nr','','R');return document.MM_returnValue">
<table width="500" align="center">

<tr>
<td>标题
<input name="bt" type="text" id="bt"></td>
</tr>
<tr>
<td>内容 <textarea name="nr" id="nr"></textarea></td>
</tr>
<tr>
<td>作者 <input name="name" type="text" id="name">
</td>
</tr>
<tr>
<td>邮件 <input name="email" type="text" id="email"></td>
</tr>
<tr>
<td>地址
<input name="add" type="text" id="add"></td>
</tr>
<tr>
<td>
<div align="right">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
</div></td>
</tr>
<tr>
<td> </td>
</tr>
</table>

<input type="hidden" name="MM_insert" value="form1">
</form></td>
</tr>
</table>
<p> </p>
</body>
</html>

flygoocn 2003-08-14
  • 打赏
  • 举报
回复
不贴出来谁知道,大家的时间都很宝贵
ridgewxy 2003-08-14
  • 打赏
  • 举报
回复
是啊,贴出来吧!

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧