בעיה בASP - תכנות - HWzone פורומים
עבור לתוכן
  • צור חשבון

בעיה בASP


intel suck

Recommended Posts

יש לי טופס שבו אני שולח סיסמא ואני אמור להיכנס לפאנל ניהול

 <html>
<head> <title> מדור ניהול </title> </head>
<body dir="rtl">
<a href="index.htm"> חזרה לאתר </a> </br>
<%if Session("adminCheck")<>"true" then
response.write "!! כניסה למורשים בלבד"
else
path=server.mappath ("data/db1.mdb")
set con=server.createobject("ADODB.Connection")
con.open "driver={Microsoft Access Driver (*.mdb)}; DBQ=" & path
set r=con.execute("select * from personal_data")
response.write "<table border width='100%'>"
do until r.eof
response.write "<tr>"
response.write "<td>"&r.fields("id")& "</td>"
response.write "<td>"&r.fields("firstname")& "</td>"
response.write "<td>"&r.fields("familyname")& "</td>"
response.write "<td>"&r.fields("gender")& "</td>"
response.write "<td>"&r.fields("passa")& "</td>"
response.write "<td>"&r.fields("email")& "</td>"
response.write "<td>"&r.fields("city")& "</td>"
bvol=r.fields("bvol")
if bvol="" then
response.write "<td> </td>"
else
response.write "<td>"&bvol&"</td>"
end if
wvol=r.fields ("wvol")
if wvol="" then
response.write "<td>" &wvol& "</td>"
end if
response.write "</tr>"
r.movenext
loop
response.write "</table>"
%>
<br>
<br>
<table width="100%">
<tr>
<td valign=top">
<form method="post" action="findFnme.asp">
<h2> לפי שם פרטי </h2>
פרטי <br> <input name="firstname">
<input type="submit" value="חפש">
</form>
</td>
<td valign="top">
<form method="post" action="findFLnme.asp">
<h2> חיפוש לפי שם פרטי ושם משפחה </h2>
פרטי <br> <input name="firstname">
<br> משפחה <br> <input name="lastname">
<input type="submit" value="חפש">
</form>
</td>
</tr>
<tr>
<td valign="top">
<form method="post" action="edit.asp">
<h2> ערוך </h2>
מספר תעודת זהות: <br>
<input name="id"> <input type="submit" value="ערוך">
</form>
</td>
<td valign="top">
<form method="post" action="delete.asp">
<h2> מחיקה </h2>
מספר תעודת זהות:<br>
<input name="id"> <input type="submit" value="מחק">
</form>
</td> </tr> </table>
</body>
</html>
<%end if%>

השגיאה שאני מקבל:

Error Type:

ADODB.Recordset (0x800A0CC1)

Item cannot be found in the collection corresponding to the requested name or ordinal.

/shirionsite/admin.asp, line 22

קובץ שליחת הנתונים:

<html>
<head>
<title> דף הניהול </title>
</head>
<body dir="rtl">
<a href="index.htm"> <font size="-1"> חזרה לאתר
</font> </a> <br>
<h1> כניסה למנהלים </h1>
הקש סיסמאת מנהל
<form method="post" action="passCheck.asp" name="myform">
<input type="password" name="psw">
<input type="submit" value="כניסה">
</form>
</html>
<% if request.form ("psw")="123456" then
Session ("adminCheck")="true"
response.redirect "admin.asp"
else
Session ("adminCheck")="false"
Response.write "הסיסמא שהקשת אינה תקינה"
end if
%>

קישור לתוכן
שתף באתרים אחרים

יכולת לפחות להדגיש לנו את שורה 22...

בהנחה שזו השורה הזאת:

bvol=r.fields("bvol")

אז יכול להיות שלא קיים בRS שדה bvol, בדוק את זה.

אגב, אתה יודע שאפשר פשוט לכתוב:

r("bvol") ?

קישור לתוכן
שתף באתרים אחרים

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

×
  • צור חדש...