SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    Phil fillup07's Avatar
    Join Date
    May 2002
    Location
    Jacksonville, FL
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Server Requirements for Access (with ASP)

    Hello,

    A question was posed to me recently that I was not sure about.

    What is required on a Windows server for an Access database to be writeable and readable via ASP scripts? The question was whether or not Access actually had to be on the box.

    Thanks,
    Phil

  2. #2
    SitePoint Addict danfran's Avatar
    Join Date
    Jan 2005
    Location
    New York City
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHiL,

    Hey dude, I used to live in Jax.. (PV), but I'm in New York City, now.. :'(


    No. You don't need to install MS Access on your web server. The drivers should already be installed as part of windows. Depending on how "old" your server is, you might want to download the latest version of "MDAC" (Microsoft Data Access Components, which contains the thing you need to hook into Access).

    The BEST way (in my opinion) is to use a UDL file and place it either in your system folder or somewhere outside the directory structure of your website. (Sometimes, I put it in the same folder as my database file)

    Put this in a text file, name it yourdatabase.udl Then, double click it to change props.. Very easy and it guarantees success!
    Code:
    [oledb]
    ; Everything after this line is an OLE DB initstring
    Provider=Microsoft.Jet.OLEDB.4.0;Password="";Data Source=D:\HTTP\someDB.mdb;Persist Security Info=True
    From ASP, you simply load this as a connection string:
    Code:
    Conn.Open "file name=mydatabase.udl"
    If you put the UDL file in a funky place, you might need the full path..
    Code:
    Conn.Open "file name=C:\SomeFolder\mydatabase.udl"
    Good luck!

  3. #3
    Phil fillup07's Avatar
    Join Date
    May 2002
    Location
    Jacksonville, FL
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot,
    Is that whole UDL bit necessary? I planned on using this in global.asa, will it work?
    Code:
    Application("myconn") = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("/data/mydb.mdb")

  4. #4
    SitePoint Addict danfran's Avatar
    Join Date
    Jan 2005
    Location
    New York City
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, in that case, yer all set!

    Dan


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •