לוגו אתר Fresh          
 
 
  אפשרות תפריט  ראשי     אפשרות תפריט  צ'אט     אפשרות תפריט  מבזקים     אפשרות תפריט  צור קשר     חץ שמאלה אשכול שאלות נפוצות ותשובות עודכן ב-30.10 בנושאי באנרים לפרש. אתם מוזמנים להכנס. חץ ימינה  

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



  #4  
ישן 03-11-2004, 17:58
  AlexKarpman AlexKarpman אינו מחובר  
 
חבר מתאריך: 20.12.01
הודעות: 20,962
באמת קשה לשים לב:
בתגובה להודעה מספר 2 שנכתבה על ידי Kill-Machine שמתחילה ב "אולי תסביר מה אתה רוצה, אני כנראה מפספס את הנקודה."

זה שעשיתי 4 רווחים בכל שורה, אבל ההזחות יצאו מטורפות בתוך בלוק ה-CODE.
זה שהוא שינה פונטים לבד בתוך בלוק ה-CODE

הנה, קבל את זה שוב, אם קשה לעבור אשכול:
קוד:
<% Dim oCon Dim oRS Dim sConStr Dim sDBPath Dim oSQLQuery 'We get the path of the MDB file(access database) through the Server.MapPath method which recieves a realtive path as an argument, and return ABSOLUTE path. sDBPath = Server.MapPath ("db.mdb") 'We create the ADO Connection String: 'Provider tells ADO what type of data source we use. In our case it's OLEDB's access mechanism to MS Access Databases(The Access database engine is called Jet. first introduced around VB3 or VB4) 'Data Source, if using THIS provider is the path to the Access database MDB file, which we concatenate to sConStr from sDBPath, which holds the path. 'If we were using MS SQl Server, for instance, Data Source would be the machine name. sConStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sDBPath 'We create new instanced of ADO's Connection(which connects us to the database), and Recordset(which gets the actual data) classes. Set oCon = Server.CreateObject ("ADODB.Connection") Set oRS = Server.CreateObject ("ADODB.RecordSet") 'We put our SQL Query here, to use later. sSQLQuery = 'whatever you need 'We tell our connection, oCon, how to connect to the database by specifying the Connection String we prepared earlier, sConStr. oCon.ConnectionString = sConStr 'We "open" the connection. This is the moment in which we actually connect to the database. oCon.Open 'We specify to our Recordset, oRS, that the connection he should use is oCon. oRS.ActiveConnection = oCon 'We execute the SQL Query we prepared eariler, sSQLQuery. oRS.Open sSQLQuery 'From now on we can proccess the data in any way we want. %>

תגובה ללא ציטוט תגובה עם ציטוט חזרה לפורום
תגובה

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

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

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

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



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

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

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

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