#12004/3/30 16:34:53
在弹出窗口网页(edit.asp)内有个表单,里面有个文本域(textarea)和一个用图像域做成的按钮(name设成了“提交“)。表单的action是temp.asp,method是post,target是_parent(就是想在弹出窗口的父窗口里产生temp.asp页面。
然后在temp.asp内写了下面的asp代码:
----------------------------------------------------------------------------------------------------------
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/DHUalumni.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_DHUalumni_STRING
Recordset1.Source = "SELECT * FROM common_msg"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 2
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Recordset1.AddNew
Recordset1("userid")=Session("id")
Recordset1("name")="aaaa"
Recordset1("time")=now()
Recordset1("content")=Request.Form("textarea")
Recordset1.Update
%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
--------------------------------------------------------------------------------------------
表common_msg有如下字段:id(自动编号),userid(文本),name(文本),time(Access的默认日期/时间格式),content(文本).
目的就是要插入一条记录。但是总是有下面的错误:
505服务器内部错误。
为什么阿,非常着急。请高手帮忙!谢谢! :( :( :confused: