Results 1 to 4 of 4

Thread: Setting up connectionless database

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    5

    Exclamation

    good day,
    i have database.mdb access file and want to use connectionless to connect the dababase.please help.
    Below is the code i try but i can't get it worked

    <%
    Dim objDB
    Dim DBName

    DBName = "driver={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath("../db/database.mdb")
    Set objDB = Server.CreateObject("ADODB.Connection")
    objDB.Open DBName
    %>



  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    perhaps you can do this...

    Code:
    <%
    Set Conn = Server.CreateObject ("ADODB.Connection")
    conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\db\database.mdb"
    %>

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    5

    Unhappy i'm posting the database to hosting server

    i'm upload my files to host server.
    and i not sure the directory my database.mdb are put in.
    please help

  4. #4
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    With an Access database you *MUST* know where it is.

    You can't have a connection-less database. You can create connectionless recordsets that are not based on a database at all, but in order to use a database, you need a connection whether you create one explicitly or implicitly.

    You need to contact your host provider and get the information or use the server.mappath method.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

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



Click Here to Expand Forum to Full Width