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

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

   
|!|

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

typhoonil לא מחובר  

בעיה בחיפושים

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

<%
	fname=Request.Form("firstname")
	sname=Request.Form("familyname")
	sq="select*from personal_data where (firstname='"&fname&"' and familyname='"&sname&"')"
	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("firstname") & "</td>"
	Response.write "<td> " & R.fields("familyname") & "</td>"
	Response.write "</tr>"
	R.movenext

	loop
	Response.write "</table>"
	R.close
	set R=nothing
%>
</body>
</html>
<%
end if
%>
חיפוש לפי שם משפחה:
קוד:
 <%
 if session ("adminCheck")<>"true" then
 response.write "כניסה למורשים בלבד!"
else%>
<html>
<head>
 <title> דף הניהול </title>
</head>
<body background="images\850.gif" 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
 
sname=request.form("familyname")
sq="select * from personal_data where (familyname='"&sname&"')"
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 ("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 ("namestreet")& "</td>"
response.write "<td>" &r.fields ("city")& "</td>"
response.write "</tr>"
r.movenext
loop
response.write "</table>"
end if
%></body></html>
בשניהם אותה שגיאה מוצגת לי רק הטבלה בלי שום נתונים מה הבעיה?
תודה

Last edited by typhoonil; 24-05-08 at 13:37..
  Reply With Quote
ישן 24-05-08, 13:13   # 2
aviho1
Winner
 
מיני פרופיל
תאריך הצטרפות: Jan 2008
הודעות: 954

aviho1 לא מחובר  

תנסה להגדיר את r כrecordset לפני שאתה משתמש בו.
ותוודא שהשמות של הinput בטופס הם כמו שרשמת פה ושיש משהו בטבלה בכלל.
__________________
להנאתם אתר משחקים כיפי.
היום עושים מסיבות רווקים ורווקות רק בלופט למסיבות, תנסו ולא תתחרטו.
  Reply With Quote
ישן 24-05-08, 13:28   # 3
typhoonil
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Nov 2007
הודעות: 54

typhoonil לא מחובר  

ה-input הוא בדיוק כמו בטופס עובדה שחיפוש לפי שם פרטי כן עובד לי
ואיפה אני מגדיר את זה כ-recordset?
  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. הזמן כעת הוא 05:52.

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