Connect to database over the internet - basic.visual

This is a discussion on Connect to database over the internet - basic.visual ; Access cannot connect to the data source (file) over an HTTP connection in this manner. If you think of the situation like your needing to copy the file, you cannot copy from http://xxxxx to anywhere without a web browser playing ...

+ Reply to Thread
Results 1 to 2 of 2

Connect to database over the internet

  1. Default Re: Connect to database over the internet

    Access cannot connect to the data source (file) over an HTTP
    connection in this manner. If you think of the situation like your
    needing to copy the file, you cannot copy from http://xxxxx to
    anywhere without a web browser playing in the middle.

    To get to the database, you will need either a mapped drive, or a UNC
    path (\\machinename\sharename) to the file. It is possible that you
    can get to it via the IP address. For example, if your web server is
    ip address 192.168.1.100 and you create a share on the computer by the
    name of "datashare", then a connection string like...

    Data Source=\\192.168.1.100\datashare\Database.mdb

    could work. Of course you will still need to allow read/write access
    to the directory where that file is located.

    This is just one of the many reasons why it might be worth your time
    to create an ASP application that can get / update the database for
    you. This way, everything is local on the server it's just the user
    interface that is done in a browser.





    On Tue, 10 Aug 2004 22:43:45 GMT, "Neo" <dt@komy.net> wrote:

    >Hi.
    >I'm new to visual basic and am trying to write an application in VB6 that I'm in need of some advise with.
    >
    >I have a Microsoft Access 2000 database that sits on a web server.
    >I will be updating a table (called Locations) in the database on a daily basis using a linked table from my machine.
    >I want a client machine to be able to connect to the database to load a combobox on a VB form from the table.
    >I've got the code working on my local machine (see below) but can't get it to point to the web server over the internet.
    >Whenever I try something like Data Source=http://myserver.com/Database.mdb I get errors.
    >Here is the code that works on my local machine. Can anyone help me get it working over the internet?
    >I guess I could use a linked table but I'd like to know how to get this working.
    >
    >Also, will the SQL Select statement be executed on the web server or on the local machine?
    >I'm not sure what is the best way to do it as there could be up to fifty machines executing the same statement at once.
    >Would you recommend the SQL be carried out on the web server or on the local machine.
    >
    >If I don't sound like I'm making much sense I'm probably not. Like I said I'm still very new to all this!
    >
    >Thanks for your help.
    >
    >Damian
    >
    >
    >
    >Code working on local machine:
    >
    >Private Sub Form_Load()
    >
    > Set cn = New ADODB.Connection
    > Set rs = New ADODB.Recordset
    >
    >' Populate the control
    > cn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Database.mdb;Persist Security Info=False")
    > With rs
    > .ActiveConnection = cn
    > .Open ("SELECT * FROM Locations WHERE Date >= 20040810")
    > .MoveFirst
    > Do While Not .EOF
    > cbxLocation.AddItem rs!Location
    > .MoveNext
    > Loop
    > .Close
    > End With
    > Set rs = Nothing
    > cn.Close
    > Set cn = Nothing
    >
    >End Sub



  2. Default Connect to database over the internet

    Hi.
    I'm new to visual basic and am trying to write an application in VB6 that I'm in need of some advise with.

    I have a Microsoft Access 2000 database that sits on a web server.
    I will be updating a table (called Locations) in the database on a daily basis using a linked table from my machine.
    I want a client machine to be able to connect to the database to load a combobox on a VB form from the table.
    I've got the code working on my local machine (see below) but can't get it to point to the web server over the internet.
    Whenever I try something like Data Source=http://myserver.com/Database.mdb I get errors.
    Here is the code that works on my local machine. Can anyone help me get it working over the internet?
    I guess I could use a linked table but I'd like to know how to get this working.

    Also, will the SQL Select statement be executed on the web server or on the local machine?
    I'm not sure what is the best way to do it as there could be up to fifty machines executing the same statement at once.
    Would you recommend the SQL be carried out on the web server or on the local machine.

    If I don't sound like I'm making much sense I'm probably not. Like I said I'm still very new to all this!

    Thanks for your help.

    Damian



    Code working on local machine:

    Private Sub Form_Load()

    Set cn = New ADODB.Connection
    Set rs = New ADODB.Recordset

    ' Populate the control
    cn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Database.mdb;Persist Security Info=False")
    With rs
    .ActiveConnection = cn
    .Open ("SELECT * FROM Locations WHERE Date >= 20040810")
    .MoveFirst
    Do While Not .EOF
    cbxLocation.AddItem rs!Location
    .MoveNext
    Loop
    .Close
    End With
    Set rs = Nothing
    cn.Close
    Set cn = Nothing

    End Sub

+ Reply to Thread

Similar Threads

  1. Wont connect to internet
    By Application Development in forum Microsoft Money
    Replies: 2
    Last Post: 07-22-2007, 09:36 AM
  2. Clarion 6 Internet Connect
    By Application Development in forum Clarion
    Replies: 0
    Last Post: 06-25-2006, 03:52 AM
  3. Connect to SQL Server via internet
    By Application Development in forum ADO DAO RDO RDS
    Replies: 0
    Last Post: 03-03-2006, 07:25 PM
  4. How to connect to the internet
    By Application Development in forum basic.visual
    Replies: 0
    Last Post: 12-07-2004, 11:45 PM
  5. Internet connect
    By Application Development in forum Clarion
    Replies: 0
    Last Post: 06-08-2004, 11:15 AM