Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Database connection

  1. #1

    Database connection

    Salve ragazzi chiedo un aiuto su un collegamento al mio database. Ho scaricato uno script riguardante un calendario di eventi, ma non riesco a capire dove devo mettere i miei dati per la connessione. il DB l'ho trasferito nella cartella mdb-database del mio server... grazie in anticipo



    <%
    '--------------------------------------------------------------------------
    'Instruction
    'There are two sections you need to look at.
    '1. Mandatory Parameters
    ' Least parameters you need to change in order to run this calendar for
    ' your site.
    '2. Optional Parameters
    ' Parameters you may set for little convenience.

    'Note
    'To comment a line, add a single quote(') at the beginning of the line.
    'To uncomment a line, remove the single quote at the beginning of the line.
    '--------------------------------------------------------------------------

    '************************************************* *************************
    '************************************************* *************************
    'Mandatory Parameters
    '************************************************* *************************
    '************************************************* *************************

    '--------------------------------------------------------------------------
    '1. Installation
    'http - Set same as virtual directory in your web server(IIS or PWS)
    'name - Site name that appears in te title bar.
    '--------------------------------------------------------------------------
    'Virtual directory for calendar
    http = "http://localhost/cal_dev/"
    name = "[ASP Easy Calenar]"

    '--------------------------------------------------------------------------
    '2. DB access
    'Set DB connection parameters.
    'Most of time, you just need to change DB_ConnectonString
    '(After DBQ=) to point to physical path to the DB on your server.
    '--------------------------------------------------------------------------
    DB_ConnectionTimeout = 120
    DB_Mode = 3
    DB_ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\Inetpub\wwwroot\ASPCalendar_dev\db \calendar.mdb;"

    '--------------------------------------------------------------------------
    '3. Date format
    'Change DateFormat value according to your Date format
    ' 1 : MM/DD (ex. August 15th - 08/15)
    ' 0 : DD/MM (ex. August 15th - 15/08)
    '--------------------------------------------------------------------------
    dateFormat = 0

    '--------------------------------------------------------------------------
    '2. Look
    'Black : #000000
    'Blue : #0000FF
    'Red : #FF0000
    'Yellow : #FFFF00
    'White : #FFFFFF
    'It is case insensitive.(Uppper and lower case are acceptable.)
    '--------------------------------------------------------------------------
    'Calendar header background color
    bg1 = "#ccffcc"
    'Week header background color
    bg2 = "#ffffcc"
    'Each cell background color
    bg3 = "#ccffcc"
    'Background color of today cell in calendar
    today_bg = "#cccccc"

    'Calendar font style
    fnt1 = "style=""font-family:verdana,arial;font-size:10pt;font-weight: normal;color:black;"""

    'Cell width in calendar
    cell_width = 80
    'Cell height in calendar
    cell_height = 30


    '************************************************* *************************
    '************************************************* *************************
    'Optional Parameters
    '************************************************* *************************
    '************************************************* *************************

    '--------------------------------------------------------------------------
    'bg color for holiday.
    ' 1 : bgcolor for holidays on.
    ' 0 : bgcolor for holidays off.

    'You need to have holiday.asp file set.
    'holiday.asp file should be in the format of:
    'YYYYDD:d,d,d
    'ex)20038:1,2,3 - 2003/8/1, 2003/8/2, and 2003/8/3 will have bgcolor.
    '*Do not write 200308, it needs to be 20038.
    '*Do not include space.
    '*Do not write 1 as 01.
    '--------------------------------------------------------------------------
    holiday_flg = 1
    holiday_bg = "FF9900"

    '--------------------------------------------------------------------------
    'Language
    'If you want to set a particular character set, uncomment one of below.
    '--------------------------------------------------------------------------
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-1"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-2"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-3"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-4"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-5"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-6"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-6-e"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-6-i"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-7"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-8"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-8-e"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-8-i"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-9"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-10"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-13"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-14"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-8859-15"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=UTF-8"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=ISO-2022-JP"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=EUC-JP"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=Shift_JIS"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=GB2312"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=Big5"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=EUC-KR"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=windows-1250"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=windows-1251"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=windows-1252"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=windows-1253"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=windows-1254"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=windows-1255"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=windows-1256"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=windows-1257"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=windows-1258"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=KOI8-R"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=KOI8-U"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=cp866"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=cp874"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=TIS-620"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=VISCII"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=VPS"">"
    'meta_language = "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=TCVN-5712"">"


    '************************************************* *************************
    REM Just for testing - do not change this value and do not uncomment it.
    REM This simulates that your server is in UK.
    '************************************************* *************************
    'session.LCID = 2057
    %>

  2. #2
    Questo script definisce i parametri che devi includere nelle asp che servono per il tuo calendario.
    Devi personalizzare i parametri con i tuoi dati e poi ti serve tutto il resto di codice per gestire appunto il calendario.

    Qui devi mettere il percorso nel tuo server:

    DB_ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\Inetpub\wwwroot\ASPCalendar_dev\db \calendar.mdb;"

    qui la tua directory virtuale:
    http = "http://localhost/cal_dev/"

    ciao

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.