标题:请问一下这大概错在哪?
取消只看楼主
aliu22
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2004-7-8
 问题点数:0 回复次数:2 
请问一下这大概错在哪?

我这个页面是数据的更新,运行后错误如下:

  • 错误类型: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) /ScoreModify.asp, 第 95 行
  • 浏览器类型: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; MyIE2)

  • 页: POST 891 bytes to /ScoreModify.asp

  • POST 数据: %CD%C1%C1%A6%D1%A7=&%BD%E1%B9%B9%C1%A6%D1%A7=45&%D7%A8%D2%B5%D3%A2%D3%EF=21&%B8%DF%B5%C8%CA%FD%D1%A7=&%B4%F3%D1%A7%CE%EF%C0%ED=32&%CD%C1%C4%BE%B2%E2%C1%BF=&%CC%E5%D3%FD=&%B2%C4%C1%CF%C1%A6%D1%A7=&%C0% . . .
2004-07-08 16:31
aliu22
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2004-7-8
得分:0 

<%@LANGUAGE="VBSCRIPT"%> <!--#include file="Connections/StudentConn.asp" --> <!--#include file="CheckLogin.asp"--> <% strSheetName = Request.QueryString("SheetName") %> <% ' *** Edit Operations: declare variables

MM_editAction = CStr(Request("URL")) 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 = "" %> <% ' *** Update Record: set variables

If (CStr(Request("MM_update")) <> "" And CStr(Request("MM_recordId")) <> "") Then

MM_editConnection = MM_StudentConn_STRING MM_editTable = strSheetName MM_editColumn = "StudentNum" MM_recordId = "'" + Request.Form("MM_recordId") + "'" MM_editRedirectUrl = "ScoreQuery2.asp?" & session("strQureyString") MM_fieldsStr = request.form("Subject") MM_columnsStr = replace(MM_fieldsStr,"value","',none,''")

' create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr, "|") MM_columns = Split(MM_columnsStr, "|") ' set the form values total = 0 For i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(i+1) = CStr(Request.Form(MM_fields(i))) if MM_fields(i+1)="" then MM_fields(i+1)="0"

' 计算总分 total =total + MM_fields(i+1) Next

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

If (CStr(Request("MM_update")) <> "" And CStr(Request("MM_recordId")) <> "") Then

' create the sql update statement MM_editQuery = "update " & MM_editTable & " set " For i = LBound(MM_fields) To UBound(MM_fields) Step 2 FormVal = MM_fields(i+1) MM_typeArray = Split(MM_columns(i+1),",") Delim = MM_typeArray(0) If (Delim = "none") Then Delim = "" AltVal = MM_typeArray(1) If (AltVal = "none") Then AltVal = "" EmptyVal = MM_typeArray(2) If (EmptyVal = "none") Then EmptyVal = "" If (FormVal = "") Then FormVal = EmptyVal Else If (AltVal <> "") Then FormVal = AltVal ElseIf (Delim = "'") Then ' escape quotes FormVal = "'" & Replace(FormVal,"'","''") & "'" Else FormVal = Delim + FormVal + Delim End If End If If (i <> LBound(MM_fields)) Then MM_editQuery = MM_editQuery & "," End If MM_editQuery = MM_editQuery & MM_columns(i) & " = " & FormVal Next '在原DW生成的代码基础上再加入总分

MM_editQuery = MM_editQuery & ",总分 = " & total

MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId

If (Not MM_abortEdit) Then ' execute the update 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 %> <% Dim Recordset1__MMColParam,Recordset2__MMColParam,Recordset3__MMColParam Recordset1__MMColParam= Request.QueryString("StudentNum") Recordset2__MMColParam = Request.QueryString("SheetName") Recordset3__MMColParam= Request.QueryString("StudentNum") %> <% set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_StudentConn_STRING Recordset1.Source = "SELECT StudentNum, Name FROM StudentInfo WHERE StudentNum = '" + Replace(Recordset1__MMColParam, "'", "''") + "'" Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 3 Recordset1.Open() Recordset1_numRows = 0 %> <% set Recordset2 = Server.CreateObject("ADODB.Recordset") Recordset2.ActiveConnection = MM_StudentConn_STRING Recordset2.Source = "SELECT SheetName, TestName FROM TestName WHERE SheetName = '" + Replace(Recordset2__MMColParam, "'", "''") + "'" Recordset2.CursorType = 0 Recordset2.CursorLocation = 2 Recordset2.LockType = 3 Recordset2.Open() Recordset2_numRows = 0 %> <% set Recordset3 = Server.CreateObject("ADODB.Recordset") Recordset3.ActiveConnection = MM_StudentConn_STRING Recordset3.Source = "SELECT * FROM " & strSheetName & " WHERE StudentNum = '" + Replace(Recordset3__MMColParam, "'", "''") + "'" Recordset3.CursorType = 0 Recordset3.CursorLocation = 2 Recordset3.LockType = 3 Recordset3.Open() Recordset3_numRows = 0 %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>学生成绩修改</TITLE> <META http-equiv=Content-Type content="text/html; charset=gb2312"> <META content="MSHTML 6.00.2600.0" Name=GENERATOR> <link href="home.css" rel="stylesheet" type="text/css"> </HEAD> <BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0> <!--#include file="ScoreManage_Top.asp"--> <TABLE width="760" border=0 align="center" cellPadding=0 cellSpacing=0> <TBODY> <TR> <TD width=1 background="images/dotLine_h.gif"><IMG src="images/shim(1).gif" width=1></TD> <TD Width="100" bgcolor="#EEEEEE"></TD> <TD width="10" bgcolor="#F2FBF2"></TD> <TD bgcolor="#F2FBF2"><img src="images/ScoreModify_Title.gif" width="500" height="60"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <TD width="150" vAlign=top> <p> <br> <strong>注:</strong><br> <br> 1、输入信息后可直接按回车键保存修改结果<br> <br> 2、输入过程中可用Tab键将光标在各输入框中切换<br> <br> 3、保存修改结果后,系统会自动转入录入下一条记录页面或查询结果结果页面。</p></TD> <td width="10" valign="top"> <table height="300" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <TD width=1 background="images/dotLine_h.gif"><IMG src="images/shim(1).gif" width=1></TD> </tr> </table></td> <TD valign="top"><form action="ScoreModify.asp" method="post" name="form1"> <b><font color="#FF0000">考试名称:</font></b><%=(Recordset2.Fields.Item("TestName").Value)%><br> <table cellspacing=4 width="100%" border=0> <tr> <td align=right width=60 height="20">学号:</td> <td align=left width=373 height="20"> <%=(Recordset3.Fields.Item("StudentNum").Value)%> </td> </tr> <tr> <td align=right width=60 height="20">姓名:</td> <td align=left width=373 height="20"> <% If Not Recordset1.EOF Or Not Recordset1.BOF Then %> <%=(Recordset1.Fields.Item("Name").Value)%> <% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %> &nbsp;</td> </tr> <% strSubject="" For i=5 to Recordset3.Fields.Count-1 response.write "<tr>" response.write "<td align=right width=60 height='20'>" & Recordset3.Fields.Item(i).Name & ":</td>" response.write "<td align=left width=373 height='20'><input maxlength=4 size=10 Name='" & Recordset3.Fields.Item(i).Name & "' value='" & Recordset3.Fields.Item(i).Value &"'>" response.write "</td></tr>" if strSubject<>"" then strSubject=strSubject & "|" & Recordset3.Fields.Item(i).Name & "|value" else strSubject= Recordset3.Fields.Item(i).Name & "|value" end if Next %> </table> <input type="hidden" Name="MM_update" value="true"> <input type="hidden" Name="MM_recordId" value="<%= Recordset3.Fields.Item("StudentNum").Value %>"> <input type="hidden" name="Subject" value="<%=strSubject%>"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="submit" Name="Submit" value="保存修改结果"></form></td> </tr> </table></td> <TD width=1 background="images/dotLine_h.gif"><IMG src="images/shim(1).gif" width=1></TD> </TR> <tr> <TD height="1" colspan="7" background="images/dotLine_w.gif"><IMG height=1 src="images/shim(1).gif" width=100></TD> </tr> </TBODY> </TABLE> <table width="760" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <Iframe src="CopyRight.asp" width="760" height="200" marginheight="0" marginwidth="0" scrolling="NO" frameborder="0" name="CopyRight"></iframe> </td> </tr> </table></BODY> </HTML> <% Recordset1.Close() %> <% Recordset2.Close() %> <% Recordset3.Close() %>


我有一颗敏感而易受挫的心,我有一个自卑而自傲的灵魂。每天我在夜色匆匆中赶路,看马路上行人来来往往。我就觉得自己像是一个一无所有流浪汉,这个城市终究有什么可以给我?
2004-07-08 16:36
aliu22
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2004-7-8
得分:0 
还是没有用,我已经搞了两天了,亲爱的版主,请帮忙搞定,另有什么好的调试软件吗?
  

我有一颗敏感而易受挫的心,我有一个自卑而自傲的灵魂。每天我在夜色匆匆中赶路,看马路上行人来来往往。我就觉得自己像是一个一无所有流浪汉,这个城市终究有什么可以给我?
2004-07-08 18:51



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-3230-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.050582 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved