台灣最大程式設計社群網站
線上人數
1067
 
會員總數:246209
討論主題:189782
歡迎您免費加入會員
討論區列表 >> ASP >> 請問發生下列錯誤,一直找不出問題所在 求救高手
[]  
[我要回覆]
1
回應主題 加入我的關注話題 檢舉此篇討論 將提問者加入個人黑名單
請問發生下列錯誤,一直找不出問題所在 求救高手
價值 : 60 QP  點閱數:1097 回應數:8
樓主


門外漢
0 157
2303 416
發送站內信

請問發生下列錯誤,一直找不出問題所在 求救高手

ADODB.Field 錯誤 '800a0bcd'
可能是 BOF 或 EOF 的值為 True,或目前的資料錄已被刪除。所要求的操作需要目前的資料錄。
/tsps_school_calendar/news/calendar_show1.asp, 行563

sql如下
Select * From calendar Where year(calendar_createdate)=2015 and month(calendar_createdate)=2 and day(calendar_createdate)=12 Order by calendar_master

行563 如下
response.write rs("calendar_createdate")

<%
' response.write SQLstr
' response.end
'response.write rs("calendar_createdate")


%>







搜尋相關Tags的文章: [ 請問發生下列錯誤 ] , [ 一直找不出問題所在 求救高手 ] ,
本篇文章發表於2015-02-13 10:12
1樓
回應

風燭殘年
捐贈 VP 給 風燭殘年 檢舉此回應
SQL 查詢不到任何資料.
所以當你要 response.write 時就會顯示錯誤.

請先確定該 SQL Command 可以查詢的到資料.
本篇文章回覆於2015-02-13 10:53
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
2樓
回應

四百龍銀
檢舉此回應
可以判斷不為空後再執行之後的動作

Debug時可以把執行後的SQL
response出來 執行看看 是否符合需求
本篇文章回覆於2015-02-13 11:16
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
3樓
作者回應


檢舉此回應
要在這表格中新增3欄
rs("person01")
rs("person02")
rs("class01")
擺在最後但會發生可能是 BOF 或 EOF 的值為 True,或目前的資料錄已被刪除。所要求的操作需要目前的資料錄。
不知如何解決?..謝謝


<td>

<%
'response.write rs("calendar_createdate")
' response.write SQLstr
' response.end
'person01=rs("person01")


if NOT(rs.EOF) Then
person01=rs("person01")
response.write "<font color='#FF0000'>"&person01&"&nbsp;"
else
response.write "<font color='#008000'>9999&nbsp;"
end if
%>

&nbsp;
</TD>
<td>&nbsp;
</TD>
<td>&nbsp;
</TD>



<!-- #include file="adovbs.asp" -->
<meta http-equiv="Content-Language" content="zh-tw">
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<%
Function GetDaysInMonth(iMonth, iYear)
Dim dTemp
dTemp = DateAdd("d", -1, DateSerial(iYear, iMonth + 1, 1))
GetDaysInMonth = Day(dTemp)
End Function

Function GetWeekdayMonthStartsOn(dAnyDayInTheMonth)
Dim dTemp
dTemp = DateAdd("d", -(Day(dAnyDayInTheMonth) - 1), dAnyDayInTheMonth)
GetWeekdayMonthStartsOn = WeekDay(dTemp)
End Function

Function SubtractOneMonth(dDate)
SubtractOneMonth = DateAdd("m", -1, dDate)
End Function

Function AddOneMonth(dDate)
AddOneMonth = DateAdd("m", 1, dDate)
End Function

Dim dDate
Dim iDIM
Dim iDOW
Dim iCurrent
Dim iPosition

If IsDate(Request.QueryString("date")) Then
dDate = CDate(Request.QueryString("date"))
Else
If IsDate(Request.QueryString("month") & "-" & Request.QueryString("day") & "-" & Request.QueryString("year")) Then
dDate = CDate(Request.QueryString("month") & "-" & Request.QueryString("day") & "-" & Request.QueryString("year"))
Else
dDate = Date()
If Len(Request.QueryString("month")) <> 0 Or Len(Request.QueryString("day")) <> 0 Or Len(Request.QueryString("year")) <> 0 Or Len(Request.QueryString("date")) <> 0 Then
Response.Write "The date you picked was not a valid date. The calendar was set to today's date.<BR><BR>"
End If
End If
End If

iDIM = GetDaysInMonth(Month(dDate), Year(dDate))
iDOW = GetWeekdayMonthStartsOn(dDate)

%>
<HEAD><TITLE>行事曆系統</TITLE></HEAD>
<BODY link="#FFFFFF" vlink="#E0E0E0" alink="#FF0000" BGCOLOR="#EAF1E9">
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BORDERCOLORDARK=#FFFFFF BORDERCOLORLIGHT=#808080 width="91%">
<TR bgcolor=#000098>
<TD colspan=2 align=center><font color=#FFFF00><strong>•村•上•國•小•行•事•曆•系•統•</strong></font></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BORDERCOLORDARK=#FFFFFF BORDERCOLORLIGHT=#808080 width="75%">
<TR>
<TD align=center valign=top width="16%">
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2 BORDERCOLORDARK=#FFFFFF BORDERCOLORLIGHT=#808080>
<TR>
<TD>
<TABLE style="font-size:9pt" BORDER=1 CELLSPACING=0 CELLPADDING=2 BGCOLOR=#D0E8D0 BORDERCOLORDARK=#FFFFFF BORDERCOLORLIGHT=#808080>
<TR>
<TD BGCOLOR=#488448 ALIGN="center" COLSPAN=7>
<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR>
<TD ALIGN="right"><A HREF="./calendar_show1.asp?date=<%= SubtractOneMonth(dDate) %>">
<FONT COLOR=#FFFF00 SIZE="2">上個月</FONT></A></TD>
<TD ALIGN="center"><font color=#FFFFFF>民國<FONT COLOR=#FFFF00><B><%=Year(dDate)-1911%></B><font color=#FFFFFF>年<FONT COLOR=#FFFF00><B><%=Month(dDate)%></B><font color=#FFFFFF>月</FONT></font></font></font></font></TD>
<TD ALIGN="left"><A HREF="./calendar_show1.asp?date=<%= AddOneMonth(dDate) %>">
<FONT COLOR=#FFFF00 SIZE="2">下個月</FONT></A></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR BGCOLOR=#90C490>
<TD ALIGN="center" BGCOLOR=#FF0000><FONT COLOR=#FFFFFF><B>
<font size="3">日</font></B></FONT></TD>
<TD ALIGN="center"><FONT COLOR=#386838><B>一</B></FONT></TD>
<TD ALIGN="center"><FONT COLOR=#386838><B>二</B></FONT></TD>
<TD ALIGN="center"><FONT COLOR=#386838><B>三</B></FONT></TD>
<TD ALIGN="center"><FONT COLOR=#386838><B>四</B></FONT></TD>
<TD ALIGN="center"><FONT COLOR=#386838><B>五</B></FONT></TD>
<TD ALIGN="center" BGCOLOR=#FF0000><FONT COLOR=#FFFFFF><B>
<font size="3">六</font></B></FONT></TD>
</TR>
<%
If iDOW <> 1 Then
Response.Write vbTab & "<TR bgcolor=#009400>" & vbCrLf
iPosition = 1
Do While iPosition < iDOW
Response.Write vbTab & vbTab & "<TD>&nbsp;</TD>" & vbCrLf
iPosition = iPosition + 1
Loop
End If

iCurrent = 1
iPosition = iDOW
Do While iCurrent <= iDIM
If iPosition = 1 Then
Response.Write vbTab & "<TR bgcolor=#009400>" & vbCrLf
End If

If iCurrent = Day(dDate) Then
Response.Write vbTab & vbTab & "<TD ALIGN=CENTER BGCOLOR=#00FFFF><FONT SIZE=""-1""><B>" & iCurrent & "</B></FONT></TD>" & vbCrLf
Else
Response.Write vbTab & vbTab & "<TD ALIGN=CENTER><A HREF=""./calendar_show2.asp?date=" & Month(dDate) & "-" & iCurrent & "-" & Year(dDate) & """><FONT SIZE=""-1"">" & iCurrent & "</FONT></A></TD>" & vbCrLf
End If

If iPosition = 7 Then
Response.Write vbTab & "</TR>" & vbCrLf
iPosition = 0
End If

iCurrent = iCurrent + 1
iPosition = iPosition + 1
Loop

If iPosition <> 1 Then
Do While iPosition <= 7
Response.Write vbTab & vbTab & "<TD>&nbsp;</TD>" & vbCrLf
iPosition = iPosition + 1
Loop
Response.Write vbTab & "</TR>" & vbCrLf
End If
%>
</TABLE>
</TD>
</TR>
</TABLE>
<%
year_now=year(Date)
month_now=month(Date)
day_now=day(Date)
%>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 style="font-size:9pt" width="201">
<FORM ACTION="./calendar_show1.asp" METHOD=GET>
<TR><TD ALIGN="center">
民國
<SELECT NAME="year" style="font-size:9pt">

<%for iyear=year_now-50 to year_now+2%>
<option value="<%=iyear%>" <%if iyear=year_now then response.write "selected"%>><%=iyear-1911%></option>
<%next%>
</SELECT>年
<SELECT NAME="month" style="font-size:9pt">
<%for imonth=1 to 12%>
<option value="<%=imonth%>" <%if imonth=month_now then response.write "selected"%>><%=imonth%></option>
<%next%>
</select>月
<SELECT NAME="day" style="font-size:9pt">
<%for iday=1 to 31%>
<option value="<%=iday%>" <%if iday=day_now then response.write "selected"%>><%=iday%></option>
<%next%>
</SELECT>日
</TD></TR>
<TR><TD align=center>
<INPUT TYPE="submit" VALUE="秀出這一天的月曆" style="font-size:9pt">
</TD></TR>
</FORM>
</TABLE>

<hr>
<TABLE bgcolor=#880000 width="107%" BORDER=0 CELLSPACING=0 CELLPADDING=2 BORDERCOLORDARK=#FFFFFF BORDERCOLORLIGHT=#808080 style="font-size:9pt" id="table1">
<TR>
<TD><font color="#FFFF00" size="2">
<p style="margin-bottom: 0px"><b>瀏覽專用</b><br>
<a href="calendar_show1.asp" target="_parent"><%=month(now())%>月行事曆</a>∣<a href="calendar_show2.asp" target="_parent">今日行事曆</a>∣<a href="calendar_print_color.asp?date=<%=dDate%>" target="_parent">彩色列印</a>
</p>
<p style="margin-top: 5px"><b>管理學期行事曆</b><br>
<a href="calendar.asp" target="_parent">編輯行事曆</a> ∣<a href="admin-rmagword.asp" target="_parent">系統管理</a><p style="margin-top: 5px; margin-bottom:-2px">
</TD>
</TR>
</TABLE>
<TABLE bgcolor=#880000 width="105%" BORDER=0 CELLSPACING=0 CELLPADDING=2 BORDERCOLORDARK=#FFFFFF BORDERCOLORLIGHT=#808080 style="font-size:9pt; margin-top:0; margin-bottom:0" id="table2">
<TR>
<TD height="125" valign="top" style="margin-top: 0; margin-bottom: 0"><font color="#FFFF00" size="2">
<form method="POST" action="calendar_print_color01.asp" style="margin-bottom: 0">
<p style="margin-top: 0px; margin-bottom: 0" align="left"><b>查詢行事厝內容</b>
<input name="workdoc01" size="18" style="float: left"><input type="submit" value="送出" name="B1" style="float: left"><input type="reset" value="重設" name="B2" style="float: left"></p>
</form>
<form method="POST" action="calendar_print_color02.asp" style="margin-top: -2; margin-bottom:0">
<p style="margin-top: 0px; margin-bottom:0" align="left"> <p style="margin-top: 0px; margin-bottom:0" align="left"> <p style="margin-top: 0px; margin-bottom:-1px" align="left">
<b>查詢行事曆</b><p style="margin-top: 0px; margin-bottom:0" align="left">
<SELECT NAME="workdoc02" style="font-size:9pt">
<%
if month_now>7 then
year_now01=year(Date)
else
year_now01=year(Date)-1

end if

for iyear=year_now01-50 to year_now01+0%>
<option value="<%=iyear%>" <%if iyear=year_now01 then response.write "selected"%>><%=iyear-1911%></option>
<%next%></SELECT>學年<SELECT NAME="workdoc020" style="font-size:9pt" size="1">
<% if month_now<7 then %>
<option value="2">第2學期</option>
<option value="8">第1學期</option>
<option value="all01">學年度</option>
<option value="all">曆年度</option>
<%
else
%>
<option value="8">第1學期</option>
<option value="2">第2學期</option>
<option value="all01">學年度</option>
<option value="all">曆年度</option>

<%
end if
%>

</SELECT><input type="submit" value="送出" name="B3"><input type="reset" value="重設" name="B4">
</form>
<p style="margin-top: 5px; margin-bottom:0"><b>
<a href="calendar_show1.asp" target="_parent">返回公佈欄首頁</a>
</b>
</TD>
</TR>
</TABLE>
<TABLE bgcolor=#880000 width="100%" BORDER=0 CELLSPACING=0 CELLPADDING=2 BORDERCOLORDARK=#FFFFFF BORDERCOLORLIGHT=#808080 style="font-size:9pt">
<TR>
</font>
</TD>
</TR>
</TABLE>
<hr>

<table width="92">
<tr>
<td> <a href="../jkcboard/Title.asp"></a></td>
</tr>
</table>

</TD>
<TD width="863" valign=top>
<TABLE width="86%" style="font-size:9pt" BORDER=0 CELLSPACING=0 CELLPADDING=2 BORDERCOLORDARK=#FFFFFF BORDERCOLORLIGHT=#808080 id="table3">
<TR><TD height=305 valign=top>
<TABLE bgcolor=#D8F0FF width="813" style="font-size:9pt" BORDER=1 CELLSPACING=0 CELLPADDING=2 BORDERCOLORDARK=#FFFFFF BORDERCOLORLIGHT=#808080 bordercolor="#000080" id="table4">
<TR bgcolor=#005488>
<TD colspan=3 align=center><font color=#FFFFFF size="3">民國<%=year(dDate)-1911%>年<%=month(dDate)%>月當月既定的行事</font></TD>
</TR>
<TR bgcolor=#0088D8>
<TD width="5%" align=center><b><font color=#FFFFFF>日</font></b></TD>
<TD width="5%" align=center><b><font color=#FFFFFF>星期</font></b></TD>
<TD width="73%" align=center><b><font color=#FFFFFF>行事曆內容</font></b></TD>
<TD width="73%" align=center><b><font color=#FFFFFF>值日人員</font></b></TD>
<TD width="73%" align=center><b><font color=#FFFFFF>導護人員</font></b></TD>
<TD width="73%" align=center><b><font color=#FFFFFF>返校打掃班級</font></b></TD>
</TR>
<%
DbPath = SERVER.MapPath("calendar.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DbPath
weekend=1


For daycount=1 to iDIM
SQLstr="Select * From calendar Where year(calendar_createdate)=" & year(dDate) & " and month(calendar_createdate)=" & month(dDate) & " and day(calendar_createdate)=" & daycount & " Order by calendar_master"
Set rs=SERVER.CreateObject("ADODB.Recordset")
rs.Open SQLstr, conn , adOpenDynamic, adLockPessimistic
' response.write SQLstr
' response.end


%>




<%If rs.Eof Then


%>
<TD align=center><%=daycount%></TD>
<%
dNow=year(dDate)&"/"&month(dDate)&"/"&daycount
meeting=weekday(CDate(dNow))
Select Case weekday(CDate(dNow))
Case 1
cweekday1="<TD align=center bgcolor=#FF0000><font color=#FFFFFF>日</font></TD>"
Case 2
cweekday1="<TD align=center>一</TD>"
Case 3
cweekday1="<TD align=center>二</TD>"
Case 4
cweekday1="<TD align=center>三</TD>"
Case 5
cweekday1="<TD align=center>四</TD>"
Case 6
cweekday1="<TD align=center>五</TD>"
Case 7
cweekday1="<TD align=center bgcolor=#FF0000><font color=#FFFFFF>六</font></TD>"
End Select


%>


<%=cweekday1%>
<TD>&nbsp; </TD>
<td>&nbsp;
</TD>
<td>&nbsp;
</TD>
<td>&nbsp;
</TD>


<%


SQLstr1="Select * From duty Where year(calendar_createdate)=" & year(dDate) & " and month(calendar_createdate)=" & month(dDate) & " and day(calendar_createdate)=" & daycount
Set rs1=SERVER.CreateObject("ADODB.Recordset")
rs1.Open SQLstr1, conn , adOpenDynamic, adLockPessimistic
If Not rs1.Eof Then
calendar_duty1=rs1("calendar_duty1")
Else
calendar_duty1=""
End If
SQLstr1=""
%>


<%
SQLstr1="Select * From duty Where year(calendar_createdate)=" & year(dDate) & " and month(calendar_createdate)=" & month(dDate) & " and day(calendar_createdate)=" & daycount
Set rs1=SERVER.CreateObject("ADODB.Recordset")
rs1.Open SQLstr1, conn , adOpenDynamic, adLockPessimistic
If Not rs1.Eof Then
calendar_duty2=rs1("calendar_duty2")
Else
calendar_duty2=""
End If
SQLstr1=""
%>

<%End If


%>

<%While Not rs.Eof%>
<TR>
<%



meeting=weekday(rs("calendar_createdate"))
Select Case weekday(rs("calendar_createdate"))
Case 1
cweekday="<TD align=center bgcolor=#FF0000><font color=#FFFFFF>日</font></TD>"
Case 2
cweekday="<TD align=center>一</TD>"
Case 3
cweekday="<TD align=center>二</TD>"
Case 4
cweekday="<TD align=center>三</TD>"
Case 5
cweekday="<TD align=center>四</TD>"
Case 6
cweekday="<TD align=center>五</TD>"
Case 7
cweekday="<TD align=center bgcolor=#FF0000><font color=#FFFFFF>六</font></TD>"
End Select
%>
<TD align=center>
<%=day(rs("calendar_createdate"))%>
</TD>
<%=cweekday%>
<TD>


<%

Select Case rs("calendar_master")
Case "校長"
calendar_master="校長"
Case "人事室/人事主任"
calendar_master="人事室"
Case "人事室/人事助理"
calendar_master="人事室"
Case "會計室/會計主任"
calendar_master="會計室"
Case "教務處/教務主任"
calendar_master="教務處"
Case "教務處/教學組長"
calendar_master="教務處"
Case "教務處/註冊組長"
calendar_master="教務處"
Case "教務處/設備組長"
calendar_master="教務處"
Case "教務處/資訊組長"
calendar_master="教務處"
Case "學務處/學務主任"
calendar_master="學務處"
Case "學務處/訓育組長"
calendar_master="學務處"
Case "學務處/生教組長"
calendar_master="學務處"
Case "學務處/衛生組長"
calendar_master="學務處"
Case "學務處/體育組長"
calendar_master="學務處"
Case "輔導室/輔導主任"
calendar_master="輔導室"
Case "輔導室/輔導組長"
calendar_master="輔導室"
Case "輔導室/資料組長"
calendar_master="輔導室"
Case "輔導室/特教組長"
calendar_master="輔導室"
Case "總務處/總務主任"
calendar_master="總務處"
Case "總務處/庶務組長"
calendar_master="總務處"
Case "總務處/出納組長"
calendar_master="總務處"
Case "總務處/文書組長"
calendar_master="總務處"
Case "資訊室"
calendar_master="資訊室"
End Select

lastoffice=calendar_master
%>

<font color=#007420>【<%=calendar_master%>】</font>





<!-- 如果行事曆之中有「放假」或「週休」字串,該行事曆說明就變色 -->
<%If InStr(rs("calendar_describe"),"放假")>0 or InStr(rs("calendar_describe"),"週休")>0 or InStr(rs("calendar_describe"),"節")>0 Then%>
<strong>
<font color=#FFFF00 style=background-color:#FF0000>A1<%=rs("calendar_describe")%></font></strong>
<%Else%>
A2<%=rs("calendar_describe")%></font>



<%End If%>

<br>

<%
lastday=rs("calendar_createdate")
%>

<%
rs.MoveNext

%>
<%
If Not rs.Eof Then


If rs("calendar_createdate")=lastday Then
Do While rs("calendar_createdate")=lastday

Select Case rs("calendar_master")
Case "校長"
calendar_master="校長"
Case "人事室/人事主任"
calendar_master="人事室"
Case "人事室/人事助理"
calendar_master="人事室"
Case "會計室/會計主任"
calendar_master="會計室"
Case "教務處/教務主任"
calendar_master="教務處"
Case "教務處/教學組長"
calendar_master="教務處"
Case "教務處/註冊組長"
calendar_master="教務處"
Case "教務處/設備組長"
calendar_master="教務處"
Case "教務處/資訊組長"
calendar_master="教務處"
Case "學務處/學務主任"
calendar_master="學務處"
Case "學務處/訓育組長"
calendar_master="學務處"
Case "學務處/生教組長"
calendar_master="學務處"
Case "學務處/衛生組長"
calendar_master="學務處"
Case "學務處/體育組長"
calendar_master="學務處"
Case "輔導室/輔導主任"
calendar_master="輔導室"
Case "輔導室/輔導組長"
calendar_master="輔導室"
Case "輔導室/資料組長"
calendar_master="輔導室"
Case "輔導室/特教組長"
calendar_master="輔導室"
Case "總務處/總務主任"
calendar_master="總務處"
Case "總務處/庶務組長"
calendar_master="總務處"
Case "總務處/出納組長"
calendar_master="總務處"
Case "總務處/文書組長"
calendar_master="總務處"
Case "資訊室"
calendar_master="資訊室"
End Select




If calendar_master=lastoffice Then
%>
<!-- 如果行事曆之中有「放假」或「週休」字串,該行事曆說明就變色 -->
<%If InStr(rs("calendar_describe"),"放假")>0 or InStr(rs("calendar_describe"),"週休")>0 Then%>
<strong>
<font color=#FFFF00 style=background-color:#FF0000>&nbsp;&nbsp;&nbsp;A<%=rs("calendar_describe")%></font></strong>
<%Else%>
</b><font color=#007420>【<%=calendar_master%>】</font>&nbsp;B<%=rs("calendar_describe")%>
<%End If%>
<br>
<%
Else
%>
<!-- 如果行事曆之中有「放假」或「週休」字串,該行事曆說明就變色 -->
<%If InStr(rs("calendar_describe"),"放假")>0 or InStr(rs("calendar_describe"),"週休")>0 Then%>
<font color=#FF0000>【<%=calendar_master%>】</font>&nbsp;<strong><font color=#FFFF00 style=background-color:#FF0000>C<%=rs("calendar_describe")%></font></font></strong>
<%Else%>
<font color=#007420>【<%=calendar_master%>】</font>&nbsp;D<%=rs("calendar_describe")%></font>
<%End If%>

<br>
<%
End If



%>

<%
lastoffice=calendar_master


rs.MoveNext

%>
</TD>
<%
If rs.Eof Then
Exit Do
End If
Loop
End If
End If
%>

<td>

<%
'response.write rs("calendar_createdate")
' response.write SQLstr
' response.end


'person01=rs("person01")




if NOT(rs.EOF) Then
person01=rs("person01")
response.write "<font color='#FF0000'>"&person01&"&nbsp;"
else
response.write "<font color='#008000'>9999&nbsp;"
end if
%>








&nbsp;
</TD>
<td>&nbsp;
</TD>
<td>&nbsp;
</TD>




<%
SQLstr2="Select * From duty Where year(calendar_createdate)=" & year(dDate) & " and month(calendar_createdate)=" & month(dDate) & " and day(calendar_createdate)=" & daycount
Set rs2=SERVER.CreateObject("ADODB.Recordset")
rs2.Open SQLstr2, conn , adOpenDynamic, adLockPessimistic
If Not rs2.Eof Then
calendar_duty1=rs2("calendar_duty1")
Else
calendar_duty1=""
End If
SQLstr2=""
%>

<%
SQLstr2="Select * From duty Where year(calendar_createdate)=" & year(dDate) & " and month(calendar_createdate)=" & month(dDate) & " and day(calendar_createdate)=" & daycount
Set rs2=SERVER.CreateObject("ADODB.Recordset")
rs2.Open SQLstr2, conn , adOpenDynamic, adLockPessimistic
If Not rs2.Eof Then
calendar_duty2=rs2("calendar_duty2")
Else
calendar_duty2=""
End If
SQLstr2=""
%>


<%Wend%>

</TR>
<%rs.Close:Set rs=Nothing%>
<%Next%>

<%conn.Close:Set conn=Nothing%>


</TABLE>
本篇文章回覆於2015-02-13 11:55
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
4樓
最有價值解答

老頑童
捐贈 VP 給 老頑童 檢舉此回應
Do While rs("calendar_createdate")=lastday
(中間省略)
rs.MoveNext

%>
</TD>
<%
If rs.Eof Then
Exit Do
End If
Loop

程式在上面這段跑完後已經是EOF狀態了
此時再去讀rs一定會出錯
是不是應該把你要加的資料寫在Do....Loop迴圈?
不然就是要用MoveFirst之類指令移回有資料的地方
本篇文章回覆於2015-02-13 16:51
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
5樓
回應

MIS2000 Lab
檢舉此回應
看到以前ASP這種程式碼,
真的有點嚇到

直譯式的、HTML與程式碼寫在一起

有點難忘,但也有些可怕 :-)
本篇文章回覆於2015-02-16 18:34
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
6樓
作者回應


檢舉此回應
謝謝回覈,目前測試修改中..
本篇文章回覆於2015-02-17 09:06
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
7樓
作者回應


檢舉此回應
謝謝老頑童大大的指導,
讀取沒有問題了,但表格會跑掉,不知問題出在那

已修改如下
<%

'將指標移到第一筆
'rs.moveFirst

response.write rs("calendar_createdate")
' response.write SQLstr
' response.end

'person01=rs("person01")

'if NOT(rs.EOF) Then
'person01=rs("person01")
'response.write "<font color='#FF0000'>"&person01&"&nbsp;"
'else
'response.write "<font color='#008000'>9999&nbsp;"
'end if
%>
1
&nbsp;
</TD>
<td>2&nbsp;
</TD>
<td>3&nbsp;
</TD>
表格會跑掉的網址
http://163.23.69.22/tsps_school_calendar/news/calendar_show11.asp
本篇文章回覆於2015-02-17 10:46
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
8樓
作者回應


檢舉此回應
ok測試出了
本篇文章回覆於2015-02-25 13:40
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
   
1

回覆
如要回應,請先登入.