הרשם שאלות ותשובות רשימת חברים לוח שנה הודעות מהיום

חזור   הוסטס - פורום אחסון האתרים הגדול בישראל > עיצוב גראפי, תכנות על כל שפותיו וקידום ושיווק אתרים > פורום תיכנות

   
|!|

השב
 
כלים לאשכול תצורת הצגה
ישן 05-05-08, 12:55   # 1
typhoonil
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Nov 2007
הודעות: 54

typhoonil לא מחובר  

בעיה בעידכון ועריכה ASP

זה הקוד של הדף חיפוש לפי שם
קוד:
<&#37;
 if session ("adminCheck")<>"true" then
 response.write "כניסה למורשים בלבד!"
else%>
<html>
<head>
 <title> דף הניהול </title>
</head>
<body dir="rtl">
<h1> דף הניהול </h1>
<h2> חיפוש לפי שם פרטי </h2>
<%
path=server.mappath("data/db1.mdb")
set con=server.createobject("ADODB.Connection")
con.open "Provider=Microsoft.Jet.OLEDB.4.0;data source=" &path
 
fname=request.form("firstname")
sq="select*from personal_data where (fname='"&firstname&"')"
set r=con.execute(sq)
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 ("fname")& "</td>"
response.write "<td>" &r.fields ("sname")& "</td>"
response.write "<td>" &r.fields ("gender")& "</td>"
response.write "<td>" &r.fields ("passworda")& "</td>"
response.write "<td>" &r.fields ("e")& "</td>"
response.write "<td>" &r.fields ("nstreet")& "</td>"
response.write "<td>" &r.fields ("city")& "</td>"
response.write "</tr>"
r.movenext
loop
response.write "</table>"
end if
%></body></html>
זאת השגיאה שאני מקבל:
Microsoft JET Database Engine (0x80040E10)
No value given for one or more required parameters.
/shirionsite/findFnme.asp, line 19

בדף העריכה זה הקוד:

קוד:
 <%
 if session("adminCheck")<>"true" then
 response.write "כניסה למורשים בלבד!"
%>
<html>
<head> <title> דף הניהול </title> </head>
<body dir="rtl">
<h2> ערוך משתמש </h2>
<%
path=Server.mappath("data/db1.mdb")
	
	set con= Server.createobject("ADODB.Connection")
       	
     
   	con.open "Provider=Microsoft.Jet.OLEDB.4.0;data source=" &path
 
	set R=con.execute(sq)
sq="select*from personal_data where (id='"&id&"')"
if r.eof then
 response.write "לא נמצאה רשומה עם מספר ת.ז המבוקש"
else
%>
<a href="admin.asp"> <font size="-1"> לדף הניהול </font> </a>
<form action="update.asp" method="post">
<table>
<tr>
<td> תעודת זהות: </td>
<td>
<input disabled value="<%=r.fields("id")%>"> </td>
<input type=hidden"="id" value="<%=r.fields("id")%>">
</tr>
<tr>
<td> שם: </td>
<td> <input name="fname" value="<%=r.fields("firstname")%>"> </td>
</tr>
<tr> <td> שם משפחה: </td> </td>
<input name="sname" value="<%=r.fields("familyname")%>"> </td> </tr>
<tr>
<td colspan="2">
<input type="radio" value="זכר" name="gender"
<%if r.fields("gender")="זכר" then response.write "checked"%>> זכר
<input type="radio" value="נקבה" name="gender"
<%if r.fields("gender")="נקבה" then response.write "checked"%>> נקבה
נקבה </td>
</tr>
<tr>
<td> דוא"ל </td>
<td> <input name="email" value="<%=r.fields("email") %>"> </td>
</tr>
<tr>
<td align="left" colspan="2"> <input type="submit" value="עדכן">
</td>
</tr> </table> </form>
<%
 end if
end if
%>
</body>
</html>
ואני מקבל דף ריק משום מה
איך אני מסדר את זה?
תודה מראש יום טוב

Last edited by typhoonil; 05-05-08 at 12:57..
  Reply With Quote
ישן 05-05-08, 13:36   # 2
DavidBD
חבר על
 
מיני פרופיל
תאריך הצטרפות: Dec 2005
גיל: 31
הודעות: 956

DavidBD לא מחובר  

sq="select*from personal_data where (fname='"&firstname&"')"
תחליף ל
sq="select * from personal_data where fname='"&firstname&"'"
__________________
דוד בן דוד.
  Reply With Quote
ישן 05-05-08, 14:05   # 3
typhoonil
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Nov 2007
הודעות: 54

typhoonil לא מחובר  

אני עדיין מקבל את אותה שגיאה
  Reply With Quote
ישן 05-05-08, 14:36   # 4
aviho1
Winner
 
מיני פרופיל
תאריך הצטרפות: Jan 2008
הודעות: 954

aviho1 לא מחובר  

שם לב שכבתבת בשאילתת הsql את המשתנה firstname שהוא לא קיים, תקן לfname.
__________________
להנאתם אתר משחקים כיפי.
היום עושים מסיבות רווקים ורווקות רק בלופט למסיבות, תנסו ולא תתחרטו.
  Reply With Quote
ישן 05-05-08, 15:39   # 5
typhoonil
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Nov 2007
הודעות: 54

typhoonil לא מחובר  

החיפוש כרגע עובד.
אבל כשאני נכנס לדף של העריכה עדיין מוצג לי דף ריק.

ויש לי עוד דף של חיפוש לפי שם ושם משפחה:
קוד:
  <&#37;
 if session ("adminCheck")<>"true" then
 response.write "כניסה למורשים בלבד!"
else%>
<html>
<head>
 <title> דף הניהול </title>
</head>
<body dir="rtl">
<h1> דף הניהול </h1>
<h2> חיפוש לפי שם פרטי </h2>
<body dir="rtl">

<%
	fname=Request.Form("firstname")
	sname=Request.Form("familyname")
	sq="select*from personal_data where (fname='"&firstname&"' and sname='"&familyname&"')"
	path=Server.mappath("data/db1.mdb")
	
	set con= Server.createobject("ADODB.Connection")
       
 	con.mode=3	
     
   	con.open "Provider=Microsoft.Jet.OLEDB.4.0;data source=" &path
 
	set R=con.execute(sq)
	Response.write "<body dir=rtl>"
	Response.write "<br>הצגת הנרשמים"
	Response.write "<table align=center border=1> <tr>"
	Response.write "<td>תעודת זהות</td>"
	Response.write "<td> שם משפחה </td>"
	Response.write "<td> שם פרטי </td>"
	Response.write "</tr>"
	do until R.eof

	Response.write "<tr>"
	Response.write "<td> " & R.fields("id") & "</td>"
	Response.write "<td> " & R.fields("fname") & "</td>"
	Response.write "<td> " & R.fields("sname") & "</td>"
	Response.write "</tr>"
	R.movenext

	loop
	Response.write "</table>"
	R.close
	set R=nothing
%>
</body>
</html>
שבו אני מקבל שגיאה:
Error Type:
Microsoft VBScript compilation (0x800A03F6)
Expected 'End'
  Reply With Quote
ישן 05-05-08, 15:43   # 6
דור
אחראי קהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
גיל: 33
הודעות: 3,724

דור לא מחובר  

תוסיף בסוף
קוד:
<%
end if
%>
  Reply With Quote
ישן 05-05-08, 15:52   # 7
typhoonil
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Nov 2007
הודעות: 54

typhoonil לא מחובר  

תודה עובד
רק העריכה עדיין מציג לי דף ריק
  Reply With Quote
ישן 05-05-08, 16:14   # 8
DavidBD
חבר על
 
מיני פרופיל
תאריך הצטרפות: Dec 2005
גיל: 31
הודעות: 956

DavidBD לא מחובר  

ציטוט:
נכתב במקור על ידי typhoonil צפה בהודעה
תודה עובד
רק העריכה עדיין מציג לי דף ריק
תחשוב קצת במקום ישר לבוא לפורום ולבקש עזרה בלי לבדוק את הקוד שלך.
לא עשית ELSE לתנאי שבודק אם הסשן קיים.
__________________
דוד בן דוד.
  Reply With Quote
השב

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 


חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 23:55.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ