 |
|
ช่วยด้วยค่ะ..งงมากเลย มัน error แบบนี้นะคะ Error Type: (0x80020009) Exception occurred. |
|
 |
|
|
 |
 |
|
แค่นี้ยังดูไม่ออกนะครับ...ลองเอามาทั้งไฟล์เลยอ่ะ..จะได้ดูออก ผมเข้าใจว่าถ้าเงื่อนไขเป็นเท็จ r.idcourse จะไม่มีค่าเลยอ่ะ หรือไม่ก็ตัวแปร idcourse เป็นค่า null อะนะ ลองดูดี
|
 |
 |
 |
 |
Date :
12 พ.ค. 2548 11:28:59 |
By :
นายกระจอก |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อืมลองเช็คค่าก่อนที่จะวัดแล้วนะคะ
r.idcourse มีค่าส่งมาค่ะ
ตามนี้นะคะ
<%@ codepage=874 %>
<% Option Explicit %>
<!--#include file="../include/function.asp" -->
<!--#include file="../include/dbconnect.asp" -->
<% If Session("user") = "" Then Response.Redirect "login.asp" end if%>
<%
dim errmsg , rs , sql , idCourse , idSection
Dim nameCourseTh , dateCourseStart , color , monththis
idCourse = Trim(Request.QueryString("idCourse"))
idSection = session("idSection")
session("idCourse") = idCourse
Set conn = CreateObject("ADODB.Connection")
conn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath("../database/QUADTraining.mdb")) & ";Jet OLEDB:Database Password=11102409"
sql = "select * from CourseDetial CD, Expertness E , Admin A , SectionClass SC , Register R " &_
" where CD.idExpertness=E.idExpertness and SC.idSection=A.idSection and R.idCourse=CD.idCourse "&_
" and A.idSection="&idSection &_
" and CD.idCourse="&idCourse
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 1,3
if rs("r.idCourse")<> "" then
errmsg = "<br><br><br><br><center>"
errmsg = errmsg & "คุณได้ทำการลงทะเบียนไปแล้วในหัวข้อการอบรมนี้ไปแล้ว <br> "
errmsg = errmsg & "กรุณา <a href=registrain.asp>คลิกที่นี่</a> เพื่อกลับไปเลือกหัวข้อการอบรมใหม่ค่ะ"
Response.Write errmsg
Response.End
end if
%>
<div align="center">
<p><span class="style1"><font size="5"><br>
ฟอร์มการลงทะเบียนการอบรม / สัมนา ออนไลน์</font>
</span></p>
<form name="regis" method="post" action="registerSave.asp">
<p><span class="style1">
</span></p>
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="23" scope="col">หัวข้อการฝึกอบรม <%=rs("nameCourseTH")%></td>
</tr>
<tr>
<th height="23" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="40%" height="23" scope="col">วันที่อบรม <%=formatdatetime(rs("dateCourseStart"),1)%></td>
<td width="20%" height="23" scope="col">เวลา <%=formatdatetime(rs("timeCourseStart"),4)%> - <%=formatdatetime(rs("timeCourseStop"),4)%></td>
<td width="40%" height="23" scope="col">สถานที่ <%=rs("placeCourse")%></td>
</tr>
</table></th>
</tr>
<tr>
<td height="23" scope="col">วิทยากร <%=rs("nameExpertness")%> <%=rs("surnameExpertness")%></td>
</tr>
<tr>
<td height="23" scope="col">รายชื่อผู้เข้าอบรมสังกัด <%=rs("section")%></td>
</tr>
</table>
<br>
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="23" scope="col">ส่วนที่ 1 : คลิกเพื่อเลือกรายชื่อพนักงานภายในแผนกของท่านที่ต้องการเข้ารับการอบรม </td>
</tr>
<tr>
<td height="23" scope="col"><blockquote>
<p>
<% Do While not rs.eof %>
<input type="checkbox" name="chack" value="<%=rs("id")%>"><%=rs("name")%> <%=rs("surname")%><br>
<%
rs.MoveNext
Loop
%>
</p>
</blockquote></td>
</tr>
<tr>
<td height="23" scope="col"> </td>
</tr>
</table>
<br>
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col">
<input type="submit" name="Submit" value=" ยืนยันส่งรายชื่อ ">
<input type="reset" name="Submit2" value=" ยกเลิกคำร้อง "></th>
</tr>
</table>
</form>
<p> </p>
</div>
<%
rs.close
conn.close
set rs=nothing
set conn=nothing
%>

|
 |
 |
 |
 |
Date :
12 พ.ค. 2548 14:48:47 |
By :
สงสารนู๋นะ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|