Results 1 to 6 of 6

Thread: Use an Access DB on the Web with DAO or similar?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    4

    Arrow

    I usually use an Access database with VB like this:

    Dim ws_WS As Workspace
    Dim db_DB As Database
    Dim rs_RS As Recordset

    Set ws_WS=Workspaces(0)
    Set db_DB=ws_WS.OpenDatabase("c:\data.mdb")
    Set rs_RS=db_DB.OpenRecordset("Table",dbOpenDynaset)

    Something like that...

    The question is: Is it possible to open a database resident on a Web server (or web host) in the same manner as I would a local database? That is, without any kind of service running on the host? Something like:

    Set db_DB=ws_WS.OpenDatabase("http://whatever.com/data.mdb")

    This kind of setup would not need any kind of service running on the host, just like in a local hard disk. Is it possible, and if so, how?

  2. #2
    Member
    Join Date
    Jun 2000
    Posts
    45
    Take a look at this thread http://forums.vb-world.net/showthrea...threadid=21195
    Mark Sreeves explains it.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    4

    Arrow

    Ok, but since the database is in, say: http://whatever.com, I cannot specify that path in the ODBC driver in control panel... what do I do?

  4. #4
    Member
    Join Date
    Jun 2000
    Posts
    45
    Hmmm.... I don't know, I'm fairly new to ASP. I assume you tried putting the URL in for the path andit didn't work, so I'm stumped.

  5. #5
    Lively Member
    Join Date
    May 1999
    Posts
    89
    it would be tricky to call it the way you want. Typically you can use an Access Db but you should use ADO and not DAO.

    ## Open DataBase Connection


    set my_conn= Server.CreateObject("ADODB.Connection")
    my_Conn.Open ConnString

    '## Get Totals
    set rs1 = Server.CreateObject("ADODB.Recordset")
    strSQL = "Select * from Totals"
    rs1.open strSQL, my_conn

    rs1.Close
    set rs1 = nothing

    Within connectionstring you could call a dsn such as

    connstring="WhateverDSNYouwant"

  6. #6

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    4

    Arrow

    Ok, but there is still one question:

    How do I specify the web path in the ODBC Control Panel icon? It only accepts regular drive or network paths, not "http://" paths...

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