לוגו אתר Fresh          
 
 
  אפשרות תפריט  ראשי     אפשרות תפריט  צ'אט     אפשרות תפריט  מבזקים     אפשרות תפריט  צור קשר     חץ שמאלה ברוכים הבאים לפורום ASP חץ ימינה  

לך אחורה   לובי הפורומים > מחשבים > ASP
שמור לעצמך קישור לדף זה באתרי שמירת קישורים חברתיים
 
כלי אשכול חפש באשכול זה



  #1  
ישן 06-07-2008, 22:53
  orwb orwb אינו מחובר  
 
חבר מתאריך: 10.06.08
הודעות: 26
בעיה|ASP|מראה דף ריק

זה הקוד:
קוד:
<% Set Conn = Server.CreateObject("ADODB.Connection") FilePath = Server.MapPath("BamBa/SqlDb.mdb") Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & FilePath & ";" SQL = "SELECT * FROM NewPage WHERE ID" Set RS = Conn.Execute(SQL) WHILE NOT RS.EOF %> <% If request.QueryString("WebName")=RS("USERTITLEx") AND Request.QueryString("PageName")=RS("SITENAMEx") Then%> <HTML> <BODY BGColor=<%=RS("USERBGx")%>> <BODY BackGround=<%=RS("USERBGx")%>> <title> אתר-<%=RS("USERTITLEx")%> </title> <style type="text/css"> a:active { color: Black; } a:visited { color:Black; } a:hover { text-decoration:none; } body { scrollbar-face-color: gray; scrollbar-shadow-color: white; scrollbar-highlight-color: white; scrollbar-3dlight-color: gray; scrollbar-darkshadow-color: gray; scrollbar-track-color: white; scrollbar-arrow-color: white; scrollbar-position:Right } </Style> <center> <Font Color="White" Face="arial" Size="5"><U><%=RS("USERMAINTITLE")%></U> </center> <BR> <center> <font color="black" face="TAHOMA" size="2"><U>חזור לדף הבית:</U></font> </center> <BR> <table Width="40" Height="40" Border="1" BorderColor="gray" align="center"> <tr> <th BackGround="white"><a href="WebSite.asp?name=<%=Request.Cookies("TITLEx")%>"><font color="green" size="2" face="TAHOME"><%=Request.Cookies("TITLEx")%> </th> </tr> </table> <BR> <table border="1px" bordercolor="#CCCCCC" align="center" width="300" height="150" cellpadding="0" cellspacing="0" height="9"> <tr> <th BGColor="#99ffee" aLign="right"><%=RS("USERTEXTx")%> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> </th> </tr> </table> <BR> <BR> <center> <a href="Index.asp"><font color="#CCCCCC" face="TAHOMA" size="2">SiteMaker-דף הבית</a></font> </center> <table align="center"> <tr> <th BackGround='imgSite/Right.gif'><font color="black" Size="2" face="Tahoma">Developer By:<font color="black" size="2" face="Tahoma"><a href="mailto:or_675@walla.co.il">orwb </tr> </table> </body> </html> <% End if%> <% RS.MoveNext WEND %>


אני לא מבין למה אין בעיה בהיתחברות למסד ובלולאה

מישהו יודע מה עושים?
חזרה לפורום
  #3  
ישן 07-07-2008, 11:51
  orwb orwb אינו מחובר  
 
חבר מתאריך: 10.06.08
הודעות: 26
בתגובה להודעה מספר 2 שנכתבה על ידי uninstall שמתחילה ב "כמה דברים, קודם כל אם תעשה..."

קודם כל תודה שענית.
וניסיתי כך:
קוד:
<% Set Conn = Server.CreateObject("ADODB. RecordSet") FilePath = Server.MapPath("BamBa/SqlDb.mdb") Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & FilePath & ";" SQL = "SELECT * FROM NewPage WHERE ID" Set RS = Conn.Execute(SQL) WHILE NOT RS.EOF %> <% If request.QueryString("WebName")=RS("USERTITLEx") AND Request.QueryString("PageName")=RS("SITENAMEx") Then%> <HTML> <BODY BGColor=<%=RS("USERBGx")%>> <BODY BackGround=<%=RS("USERBGx")%>> <title> אתר-<%=RS("USERTITLEx")%> </title> <style type="text/css"> a:active { color: Black; } a:visited { color:Black; } a:hover { text-decoration:none; } body { scrollbar-face-color: gray; scrollbar-shadow-color: white; scrollbar-highlight-color: white; scrollbar-3dlight-color: gray; scrollbar-darkshadow-color: gray; scrollbar-track-color: white; scrollbar-arrow-color: white; scrollbar-position:Right } </Style> <center> <Font Color="White" Face="arial" Size="5"><U><%=RS("USERMAINTITLE")%></U> </center> <BR> <center> <font color="black" face="TAHOMA" size="2"><U>חזור לדף הבית:</U></font> </center> <BR> <table Width="40" Height="40" Border="1" BorderColor="gray" align="center"> <tr> <th BackGround="white"><a href="WebSite.asp?name=<%=Request.Cookies("TITLEx")%>"><font color="green" size="2" face="TAHOME"><%=Request.Cookies("TITLEx")%> </th> </tr> </table> <BR> <table border="1px" bordercolor="#CCCCCC" align="center" width="300" height="150" cellpadding="0" cellspacing="0" height="9"> <tr> <th BGColor="#99ffee" aLign="right"><%=RS("USERTEXTx")%> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> </th> </tr> </table> <BR> <BR> <center> <a href="Index.asp"><font color="#CCCCCC" face="TAHOMA" size="2">SiteMaker-דף הבית</a></font> </center> <table align="center"> <tr> <th BackGround='imgSite/Right.gif'><font color="black" Size="2" face="Tahoma">Developer By:<font color="black" size="2" face="Tahoma"><a href="mailto:or_675@walla.co.il">orwb </tr> </table> </body> </html> <% End if%> <% RS.MoveNext WEND %>


וזה נתן לי את השגיאה הבאה:
קוד:
Script error detected at line 3. Source line: Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & FilePath & ";" Description: ‏‏דרוש אובייקט: 'Conn'


יש לך מושג למה?
חזרה לפורום
  #4  
ישן 07-07-2008, 13:11
  משתמש זכר uninstall uninstall אינו מחובר  
 
חבר מתאריך: 11.11.01
הודעות: 1,751
בתגובה להודעה מספר 3 שנכתבה על ידי orwb שמתחילה ב "קודם כל תודה שענית. וניסיתי..."

הסתבכת עם האובייקטים של Connection ו- RecordSet.
קודם כל מדובר ב 2 אובייקטים שונים לגמרי.
דבר נוסף, ל Record Set אין מתודה של Execute.

בכל מקרה, זה החלק המתוקן של מה שאתה מנסה לעשות:
קוד:
Set Conn = Server.CreateObject("ADODB. Connection") Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("BamBa/SqlDb.mdb") & ";" SQL = "SELECT * FROM NewPage WHERE ID" set rs = Server.CreateObject("adodb.recordset") rs.open SQL, conn, 3, 3


אני ממליץ לך לשבת וללמוד שוב את הנושא של עבודה מול מסדי נתונים ב-ASP.
אתה מוזמן להעזר במדריך הזה: http://www.webmaster.org.il/article.asp?id=258

בהצלחה

חזרה לפורום

כלי אשכול חפש באשכול זה
חפש באשכול זה:

חיפוש מתקדם
מצבי תצוגה דרג אשכול זה
דרג אשכול זה:

מזער את תיבת המידע אפשרויות משלוח הודעות
אתה לא יכול לפתוח אשכולות חדשים
אתה לא יכול להגיב לאשכולות
אתה לא יכול לצרף קבצים
אתה לא יכול לערוך את ההודעות שלך

קוד vB פעיל
קוד [IMG] פעיל
קוד HTML כבוי
מעבר לפורום



כל הזמנים המוצגים בדף זה הם לפי איזור זמן GMT +2. השעה כעת היא 18:38

הדף נוצר ב 0.06 שניות עם 10 שאילתות

הפורום מבוסס על vBulletin, גירסא 3.0.6
כל הזכויות לתוכנת הפורומים שמורות © 2024 - 2000 לחברת Jelsoft Enterprises.
כל הזכויות שמורות ל Fresh.co.il ©

צור קשר | תקנון האתר