帮 帮 忙 ???急呀!!! ( 积分: 50 )

  • 主题发起人 主题发起人 Eroswar
  • 开始时间 开始时间
E

Eroswar

Unregistered / Unconfirmed
GUEST, unregistred user!
兄弟帮帮忙我最近在试做一个《新闻发布页》是网络上的一个例子学着做的?
我用的网页制作工具是:Dreamweaver MX 4.0中文版
可不知道为什么我把主要的输入窗口都做好了,最后把数据[绑定]好后,运行
IE浏览,晕~~~!出现了出错页面? 这个问题以烦了我四五天了!兄弟帮帮我吧?
我的页面的[动态页面New.asp]
比如新闻发布的[新闻添加页面]基本样子如下:
----------------------------
新闻标题 | - 输 入 框 - |
----------------------------
新闻出处 | - 输 入 框 - |
----------------------------
| |
|
新闻内容 |-新闻内容输入框-|
|
| |
-----------------------------
|提 交| |重 置|
----------------------------
要是数据不[绑定]就可以在IE里显示[新闻添加页面]的输入窗口,要是数据[绑定]
好就不能在IE里显示[新闻添加页面]的输入窗口了?就出现如下错误!
错误内容如下:
--------------------------------------------------------------------
[BOF EOF問題中文版:ADODB.Field (0x800A0BCD) 可能是 BOF 或 EOF 的值為
True,或目前的記錄已被刪除。所要求的操作需要目前的記錄]
本页无法显示
试图访问的网页出现问题,无法显示。
====================================================
请尝试以下方法:
单击 刷新按钮或者梢候再试。
打开 localhost 主页,然后查找与所需信息相关的链接。
HTTP 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务

技术信息(适用于支持人员)
错误类型:
ADODB.Field (0x800A0BCD)
/News/new.asp, 第 167 行

浏览器类型:
Mozilla/4.0 (compatible;
MSIE 5.01;
Windows NT 5.0)
页:
GET /News/new.asp
时间:
2005年4月10日, 12:46:43

详细信息:
Microsoft 支持
=======================================================
--------------------------------------------------------------------
我为了这件事我把电脑的系统都重新安装一下!还是不行???
--------------------------------------------------------------------
我现在初步分析应该是数据集连接的问题吧???因为如上以说明了不[绑定]数据
就可以在IE中显示[新闻添加页面]的输入窗口,现我还是找不到那里数据[绑定]错
误???
如下是全部代码:帮我看看吧!
页面源代码如下:
<%@LANGUAGE=&quot;VBSCRIPT&quot;
CODEPAGE=&quot;936&quot;%>
<!--#include file=&quot;Connections/erosk.asp&quot;
-->
<%
' *** 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(&quot;SCRIPT_NAME&quot;))
If (Request.QueryString <> &quot;&quot;) then
MM_editAction = MM_editAction &amp;
&quot;?&quot;
&amp;

Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = &quot;&quot;
%>
<%
' *** Insert Record: set variables
If (CStr(Request(&quot;MM_insert&quot;)) = &quot;form1&quot;) then

MM_editConnection = MM_erosk_STRING
MM_editTable = &quot;News&quot;
MM_editRedirectUrl = &quot;new.asp&quot;
MM_fieldsStr = &quot;titlek|value|comek|value|contk|value&quot;
MM_columnsStr = &quot;title|',none,''|come|',none,''|cont|',none,''&quot;
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, &quot;|&quot;)
MM_columns = Split(MM_columnsStr, &quot;|&quot;)

' 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 <> &quot;&quot;
And Request.QueryString <> &quot;&quot;) then
If (InStr(1, MM_editRedirectUrl, &quot;?&quot;, vbTextCompare) = 0 And
Request.QueryString <> &quot;&quot;) then
MM_editRedirectUrl = MM_editRedirectUrl &amp;
&quot;?&quot;
&amp;

Request.QueryString
else
MM_editRedirectUrl = MM_editRedirectUrl &amp;
&quot;&amp;&quot;
&amp;

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(&quot;MM_insert&quot;)) <> &quot;&quot;) then

' create the sql insert statement
MM_tableValues = &quot;&quot;
MM_dbValues = &quot;&quot;
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),&quot;,&quot;)
MM_delim = MM_typeArray(0)
If (MM_delim = &quot;none&quot;) then
MM_delim = &quot;&quot;
MM_altVal = MM_typeArray(1)
If (MM_altVal = &quot;none&quot;) then
MM_altVal = &quot;&quot;
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = &quot;none&quot;) then
MM_emptyVal = &quot;&quot;
If (MM_formVal = &quot;&quot;) then
MM_formVal = MM_emptyVal
else
If (MM_altVal <> &quot;&quot;) then
MM_formVal = MM_altVal
else
If (MM_delim = &quot;'&quot;) then
' escape quotes
MM_formVal = &quot;'&quot;
&amp;
Replace(MM_formVal,&quot;'&quot;,&quot;''&quot;) &amp;
&quot;'&quot;
else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) then
MM_tableValues = MM_tableValues &amp;
&quot;,&quot;
MM_dbValues = MM_dbValues &amp;
&quot;,&quot;
End If
MM_tableValues = MM_tableValues &amp;
MM_columns(MM_i)
MM_dbValues = MM_dbValues &amp;
MM_formVal
Next
MM_editQuery = &quot;insert into &quot;
&amp;
MM_editTable &amp;
&quot;
(&quot;
&amp;
MM_tableValues &amp;

&quot;) values (&quot;
&amp;
MM_dbValues &amp;
&quot;)&quot;
If (Not MM_abortEdit) then
' execute the insert
Set MM_editCmd = Server.CreateObject(&quot;ADODB.Command&quot;)
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> &quot;&quot;) then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = &quot;1&quot;
If (Request.QueryString(&quot;id&quot;) <> &quot;&quot;) then

Recordset1__MMColParam = Request.QueryString(&quot;id&quot;)
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject(&quot;ADODB.Recordset&quot;)
Recordset1.ActiveConnection = MM_erosk_STRING
Recordset1.Source = &quot;SELECT * FROM News WHERE id = &quot;
+
Replace(Recordset1__MMColParam, &quot;'&quot;, &quot;''&quot;) + &quot;
ORDER BY id ASC&quot;
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;

&quot;http://www.w3.org/TR/html4/loose.dtd&quot;>
<html>
<head>
<meta http-equiv=&quot;Content-Type&quot;
content=&quot;text/html;
charset=gb2312&quot;>
<title>添加新闻页</title>
<style type=&quot;text/css&quot;>
<!--
.as1 {
font-family: &quot;宋体&quot;;
font-size: 14px;
font-style: normal;
font-weight: bold;
color: #FF9933;
}
-->
</style>
<body>
<form ACTION=&quot;<%=MM_editAction%>&quot;
METHOD=&quot;POST&quot;
name=&quot;form1&quot;>
<table width=&quot;348&quot;
height=&quot;210&quot;
border=&quot;1&quot;
align=&quot;center&quot;>
<tr>
<td width=&quot;89&quot;
height=&quot;28&quot;
align=&quot;center&quot;
class=&quot;as1&quot;>新闻标题
</td>
<td width=&quot;243&quot;><input name=&quot;titlek&quot;
type=&quot;text&quot;
id=&quot;titlek&quot;

value=&quot;<%=(Recordset1.Fields.Item(&quot;title&quot;).Value)%>&quot;></td>
</tr>
<tr>
<td height=&quot;26&quot;
align=&quot;center&quot;
class=&quot;as1&quot;>新闻出处</td>
<td height=&quot;26&quot;><input name=&quot;comek&quot;
type=&quot;text&quot;
id=&quot;comek&quot;

value=&quot;<%=(Recordset1.Fields.Item(&quot;come&quot;).Value)%>&quot;></td>
</tr>
<tr>
<td height=&quot;105&quot;
align=&quot;center&quot;
class=&quot;as1&quot;>新闻内容</td>
<td height=&quot;105&quot;><textarea name=&quot;contk&quot;
cols=&quot;35&quot;
rows=&quot;7&quot;

id=&quot;contk&quot;><%=(Recordset1.Fields.Item(&quot;cont&quot;).Value)%></textarea></td>
</tr>
<tr>
<td height=&quot;33&quot;
colspan=&quot;2&quot;><div align=&quot;center&quot;>
<input name=&quot;tijiao&quot;
type=&quot;submit&quot;
id=&quot;tijiao&quot;
value=&quot;提 交&quot;>
<input name=&quot;chongzi&quot;
type=&quot;reset&quot;
id=&quot;chongzi&quot;
value=&quot;重 置&quot;>
</div>
</tr>
</table>
<input type=&quot;hidden&quot;
name=&quot;MM_insert&quot;
value=&quot;form1&quot;>
</form>


<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
 
兄弟帮帮忙我最近在试做一个《新闻发布页》是网络上的一个例子学着做的?
我用的网页制作工具是:Dreamweaver MX 4.0中文版
可不知道为什么我把主要的输入窗口都做好了,最后把数据[绑定]好后,运行
IE浏览,晕~~~!出现了出错页面? 这个问题以烦了我四五天了!兄弟帮帮我吧?
我的页面的[动态页面New.asp]
比如新闻发布的[新闻添加页面]基本样子如下:
----------------------------
新闻标题 | - 输 入 框 - |
----------------------------
新闻出处 | - 输 入 框 - |
----------------------------
| |
|
新闻内容 |-新闻内容输入框-|
|
| |
-----------------------------
|提 交| |重 置|
----------------------------
要是数据不[绑定]就可以在IE里显示[新闻添加页面]的输入窗口,要是数据[绑定]
好就不能在IE里显示[新闻添加页面]的输入窗口了?就出现如下错误!
错误内容如下:
--------------------------------------------------------------------
[BOF EOF問題中文版:ADODB.Field (0x800A0BCD) 可能是 BOF 或 EOF 的值為
True,或目前的記錄已被刪除。所要求的操作需要目前的記錄]
本页无法显示
试图访问的网页出现问题,无法显示。
====================================================
请尝试以下方法:
单击 刷新按钮或者梢候再试。
打开 localhost 主页,然后查找与所需信息相关的链接。
HTTP 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务

技术信息(适用于支持人员)
错误类型:
ADODB.Field (0x800A0BCD)
/News/new.asp, 第 167 行

浏览器类型:
Mozilla/4.0 (compatible;
MSIE 5.01;
Windows NT 5.0)
页:
GET /News/new.asp
时间:
2005年4月10日, 12:46:43

详细信息:
Microsoft 支持
=======================================================
--------------------------------------------------------------------
我为了这件事我把电脑的系统都重新安装一下!还是不行???
--------------------------------------------------------------------
我现在初步分析应该是数据集连接的问题吧???因为如上以说明了不[绑定]数据
就可以在IE中显示[新闻添加页面]的输入窗口,现我还是找不到那里数据[绑定]错
误???
如下是全部代码:帮我看看吧!
页面源代码如下:
<%@LANGUAGE=&quot;VBSCRIPT&quot;
CODEPAGE=&quot;936&quot;%>
<!--#include file=&quot;Connections/erosk.asp&quot;
-->
<%
' *** 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(&quot;SCRIPT_NAME&quot;))
If (Request.QueryString <> &quot;&quot;) then
MM_editAction = MM_editAction &amp;
&quot;?&quot;
&amp;

Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = &quot;&quot;
%>
<%
' *** Insert Record: set variables
If (CStr(Request(&quot;MM_insert&quot;)) = &quot;form1&quot;) then

MM_editConnection = MM_erosk_STRING
MM_editTable = &quot;News&quot;
MM_editRedirectUrl = &quot;new.asp&quot;
MM_fieldsStr = &quot;titlek|value|comek|value|contk|value&quot;
MM_columnsStr = &quot;title|',none,''|come|',none,''|cont|',none,''&quot;
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, &quot;|&quot;)
MM_columns = Split(MM_columnsStr, &quot;|&quot;)

' 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 <> &quot;&quot;
And Request.QueryString <> &quot;&quot;) then
If (InStr(1, MM_editRedirectUrl, &quot;?&quot;, vbTextCompare) = 0 And
Request.QueryString <> &quot;&quot;) then
MM_editRedirectUrl = MM_editRedirectUrl &amp;
&quot;?&quot;
&amp;

Request.QueryString
else
MM_editRedirectUrl = MM_editRedirectUrl &amp;
&quot;&amp;&quot;
&amp;

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(&quot;MM_insert&quot;)) <> &quot;&quot;) then

' create the sql insert statement
MM_tableValues = &quot;&quot;
MM_dbValues = &quot;&quot;
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),&quot;,&quot;)
MM_delim = MM_typeArray(0)
If (MM_delim = &quot;none&quot;) then
MM_delim = &quot;&quot;
MM_altVal = MM_typeArray(1)
If (MM_altVal = &quot;none&quot;) then
MM_altVal = &quot;&quot;
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = &quot;none&quot;) then
MM_emptyVal = &quot;&quot;
If (MM_formVal = &quot;&quot;) then
MM_formVal = MM_emptyVal
else
If (MM_altVal <> &quot;&quot;) then
MM_formVal = MM_altVal
else
If (MM_delim = &quot;'&quot;) then
' escape quotes
MM_formVal = &quot;'&quot;
&amp;
Replace(MM_formVal,&quot;'&quot;,&quot;''&quot;) &amp;
&quot;'&quot;
else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) then
MM_tableValues = MM_tableValues &amp;
&quot;,&quot;
MM_dbValues = MM_dbValues &amp;
&quot;,&quot;
End If
MM_tableValues = MM_tableValues &amp;
MM_columns(MM_i)
MM_dbValues = MM_dbValues &amp;
MM_formVal
Next
MM_editQuery = &quot;insert into &quot;
&amp;
MM_editTable &amp;
&quot;
(&quot;
&amp;
MM_tableValues &amp;

&quot;) values (&quot;
&amp;
MM_dbValues &amp;
&quot;)&quot;
If (Not MM_abortEdit) then
' execute the insert
Set MM_editCmd = Server.CreateObject(&quot;ADODB.Command&quot;)
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> &quot;&quot;) then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = &quot;1&quot;
If (Request.QueryString(&quot;id&quot;) <> &quot;&quot;) then

Recordset1__MMColParam = Request.QueryString(&quot;id&quot;)
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject(&quot;ADODB.Recordset&quot;)
Recordset1.ActiveConnection = MM_erosk_STRING
Recordset1.Source = &quot;SELECT * FROM News WHERE id = &quot;
+
Replace(Recordset1__MMColParam, &quot;'&quot;, &quot;''&quot;) + &quot;
ORDER BY id ASC&quot;
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;

&quot;http://www.w3.org/TR/html4/loose.dtd&quot;>
<html>
<head>
<meta http-equiv=&quot;Content-Type&quot;
content=&quot;text/html;
charset=gb2312&quot;>
<title>添加新闻页</title>
<style type=&quot;text/css&quot;>
<!--
.as1 {
font-family: &quot;宋体&quot;;
font-size: 14px;
font-style: normal;
font-weight: bold;
color: #FF9933;
}
-->
</style>
<body>
<form ACTION=&quot;<%=MM_editAction%>&quot;
METHOD=&quot;POST&quot;
name=&quot;form1&quot;>
<table width=&quot;348&quot;
height=&quot;210&quot;
border=&quot;1&quot;
align=&quot;center&quot;>
<tr>
<td width=&quot;89&quot;
height=&quot;28&quot;
align=&quot;center&quot;
class=&quot;as1&quot;>新闻标题
</td>
<td width=&quot;243&quot;><input name=&quot;titlek&quot;
type=&quot;text&quot;
id=&quot;titlek&quot;

value=&quot;<%=(Recordset1.Fields.Item(&quot;title&quot;).Value)%>&quot;></td>
</tr>
<tr>
<td height=&quot;26&quot;
align=&quot;center&quot;
class=&quot;as1&quot;>新闻出处</td>
<td height=&quot;26&quot;><input name=&quot;comek&quot;
type=&quot;text&quot;
id=&quot;comek&quot;

value=&quot;<%=(Recordset1.Fields.Item(&quot;come&quot;).Value)%>&quot;></td>
</tr>
<tr>
<td height=&quot;105&quot;
align=&quot;center&quot;
class=&quot;as1&quot;>新闻内容</td>
<td height=&quot;105&quot;><textarea name=&quot;contk&quot;
cols=&quot;35&quot;
rows=&quot;7&quot;

id=&quot;contk&quot;><%=(Recordset1.Fields.Item(&quot;cont&quot;).Value)%></textarea></td>
</tr>
<tr>
<td height=&quot;33&quot;
colspan=&quot;2&quot;><div align=&quot;center&quot;>
<input name=&quot;tijiao&quot;
type=&quot;submit&quot;
id=&quot;tijiao&quot;
value=&quot;提 交&quot;>
<input name=&quot;chongzi&quot;
type=&quot;reset&quot;
id=&quot;chongzi&quot;
value=&quot;重 置&quot;>
</div>
</tr>
</table>
<input type=&quot;hidden&quot;
name=&quot;MM_insert&quot;
value=&quot;form1&quot;>
</form>


<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
 
后退
顶部