Need help with datbase setup

Discussion in 'Databases' started by bpossible, Feb 19, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. /emoticons/cry.gif
    Can anyon help me, on my ODBC Tool I have my DSN: classifiedc_mydatabase and my Path: \_database\cldb.mdb

    I still can't get the path to connect. I have changed the db file name to: mydatabase and my config.asp is set up as so:

    '### CHANGE FOLLOWING VALUES TO REFLECT THE CORRECT PATH TO FOLDERS ###

    dbFolder = 'mydatabase/'
    upload = 'cl_upload/'
    imgLocation = 'img/'
    bnrLocation = 'banners/'
    ad_cache = 'ads/'
    logo = 'img/logo.jpg'

    '### CONNECTION STRINGS CONFIGURATION ###

    Select Case databaseType
    strConn = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source='
    strConn = strConn & Server.MapPath(dbFolder & 'cldb.mdb') & ';'
    '*** MySQL DATABASE ***

    Case 'mysql'
    Dim MySQLServer

    mysql = true

    '# MySQL SERVER IP ADDRESS (PROVIDED BY YOUR HOST)

    MySQLServer = 'mysql01.discountasp.net'

    '# MySQL USER ID (AUTHENTICATION)

    MySQLUser = 'classifiedc'

    '# MySQL PASSWORD (AUTHENTICATION)

    MySQLPassword = 'xxxxxxx'

    '# MySQL DATABASE NAME

    MySQLDBName = 'mydatabase'

    '# If you choose to modify connection string make sure to change the connection string in mysql_tbl_setup.asp

    strConn = 'Driver={MySQL ODBC 3.51 Driver};server=' & MySQLServer
    strConn = strConn & ';uid=' & MySQLUser
    strConn = strConn & ';pwd=' & MySQLPassword
    strConn = strConn & ';database=' & MySQLDBName & ';'

    End Select

    I would like to know what I am doing wrong.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    first of all, are you using Access or mySQL?

    If you are using access


    try change this line

    strConn = strConn & Server.MapPath(dbFolder & 'cldb.mdb') & ';'

    to


    strConn = strConn & Server.MapPath('\_database\cldb.mdb') & ';'

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page