请问为什么我的表单信息无法上传到数据库中?

fralee625 2003-09-13 12:02:27
环境: DW MX + ASP +SQLSERVER 2000

运行时候不提示任何错误,而且也没有转到 uploadok.htm 页面上
数据库没有添加上记录
为什么呢?

表单部分代码如下:
<form ACTION="<%=MM_editAction%>" METHOD="POST" enctype="multipart/form-data" name="form1">
<TABLE border=0 width="100%">
<TBODY>
<TR>
<TD height=20 width="22%"> <DIV align=right>ISBN:</DIV></TD>
<TD width="78%"><INPUT name=ISBN id="ISBN"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt">
* </TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>书籍名称:</DIV></TD>
<TD width="78%"><INPUT name=bookname id="bookname"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt">
* </TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>书籍类别:</DIV></TD>
<TD width="78%"><select name="combo1" size="1">
<%
While (NOT rsleibie.EOF)
%>
<option value="<%=(rsleibie.Fields.Item("TYPE").Value)%>"><%=(rsleibie.Fields.Item("TYPE_CN").Value)%></option>
<%
rsleibie.MoveNext()
Wend
If (rsleibie.CursorType > 0) Then
rsleibie.MoveFirst
Else
rsleibie.Requery
End If
%>
</select>
* </TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>译作者:</DIV></TD>
<TD width="78%"><INPUT name=author id="author"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt" size=50></TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>出版社:</DIV></TD>
<TD width="78%"><INPUT name=chubanshe id="chubanshe"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt"></TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>学科顾问:</DIV></TD>
<TD width="78%"><INPUT name=guwen id="guwen"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt">
</TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right> 出版日期: </DIV></TD>
<TD width="78%"><INPUT name=chubandate id="chubandate"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt">
</TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>书籍定价:</DIV></TD>
<TD width="78%"><INPUT name=dingjia id="dingjia"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt"></TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>版次:</DIV></TD>
<TD width="78%"><INPUT name=banci id="banci"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt"></TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>字数:</DIV></TD>
<TD width="78%"><INPUT name=zishu id="zishu"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt"></TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>印张:</DIV></TD>
<TD width="78%"><INPUT name=yinzhang id="yinzhang"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt"></TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>印数:</DIV></TD>
<TD width="78%"><INPUT name=yinshu id="yinshu"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt"></TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>页数:</DIV></TD>
<TD width="78%"><INPUT name=yeshu id="yeshu"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt"></TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>开本:</DIV></TD>
<TD width="78%"><INPUT name=kaiben id="kaiben"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt"></TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>是否已经定购:</DIV></TD>
<TD width="78%"> <input name="dinggou" type="checkbox" id="dinggou" value="checkbox">
已经定购 (不选为未定购)</TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>条码:</DIV></TD>
<TD width="78%"><INPUT name=tiaoma id="tiaoma"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt" size=24></TD>
</TR>
<TR>
<TD height=20 width="22%"> <DIV align=right>适用等级:</DIV></TD>
<TD width="78%"><INPUT name=shiyongdengji id="shiyongdengji"
style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; FONT-SIZE: 9pt" size=24></TD>
</TR>
<TR>
<TD width="22%" height=89> <DIV align=right>书籍介绍:</DIV></TD>
<TD width="78%" valign="bottom"> <textarea name="jieshao" cols="60" rows="5" id="jieshao" style="BACKGROUND: #dfefff;" ></textarea>
</TD>
<INPUT name=CreatedDate type=hidden
value="2003-9-9 9:46:45">
</TR>
<TR>
<TD height=87 align="right">备注:</TD>
<TD><textarea name="beizhu" cols="60" rows="5" id="beizhu" style="BACKGROUND: #dfefff;"></textarea></TD>
</TR>
<TR>
<TD width="22%" height=31 align="right">上传图片:</TD>
<TD><input name="file" type="file" size="30" style="BACKGROUND: #dfefff;"></TD>
</TR>
<!---------------begin------------------->
<!----------------end------------------>
<TR>
<TD height=20 width="22%"></TD>
<TD height=20 width="78%"> <input type="submit" name="Submit" value="提交" style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; CURSOR: hand; FONT-SIZE: 9pt">
<input name=Cancel type=reset id="Cancel" style="BACKGROUND: #dfefff; BORDER-BOTTOM: #777c74 1px solid; BORDER-LEFT: #777c74 1px solid; BORDER-RIGHT: #777c74 1px solid; BORDER-TOP: #777c74 1px solid; CURSOR: hand; FONT-SIZE: 9pt" value=取消>
</TD>
</TR>
</TBODY>
</TABLE>
<input type="hidden" name="MM_insert" value="form1">
</form>
</body>
</html>
<%
rsleibie.Close()
Set rsleibie = Nothing
%>
...全文
103 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
fralee625 2003-09-13
  • 打赏
  • 举报
回复
' *** Insert Record: set variables

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

MM_editConnection = MM_test_STRING
MM_editTable = "dbo.bookinfo"
MM_editRedirectUrl = "uploadok.htm"
MM_fieldsStr = "ISBN|value|bookname|value|combo1|value|author|value|chubanshe|value|guwen|value|chubandate|value|dingjia|value|banci|value|zishu|value|yinzhang|value|yinshu|value|yeshu|value|kaiben|value|tiaoma|value|shiyongdengji|value|jieshao|value|beizhu|value"
MM_columnsStr = "ISBN|',none,''|NAME|',none,''|TYPE|',none,''|AUTHOR|',none,''|CHUBANSHE|',none,''|GUWEN|',none,''|CHUBANDATE|',none,''|DINGJIA|',none,''|BANCI|',none,''|ZISHU|',none,''|YINZHANG|',none,''|YINSHU|',none,''|YESHU|',none,''|KAIBEN|',none,''|TIAOMA|',none,''|SHIYONGDENGJI|',none,''|ALT2|',none,''|BEIZHU|',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
%>
<%
fralee625 2003-09-13
  • 打赏
  • 举报
回复
to: ceocio(SWJTU 2000-2004)


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 = ""
fralee625 2003-09-13
  • 打赏
  • 举报
回复
我在“服务器行为”中选“插入记录”,记录集已经设定好了,测试没有问题,可以正常读取,但是按“确定”上传的时候,数据库不响应,而且没有错误提示。
ceocio 2003-09-13
  • 打赏
  • 举报
回复
<%=MM_editAction%>这个变量哪儿传过来的?
yzwxjun 2003-09-13
  • 打赏
  • 举报
回复
光是放个表单在此有什么用,主要是存放数据库项的那个页面。

28,391

社区成员

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

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