How to connect access database located in a networked PC

Discussion in 'PHP' started by KingCobra, Jul 25, 2009.

  1. #1
    I have site (php made) that hosted on a third party hosting server. My database is also there.

    I want to read some data from a ms access database that is located my local area networked computer.

    So how can I connect access database located in a networked PC and read data form that?

    PLEASE HELP
     
    KingCobra, Jul 25, 2009 IP
  2. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    ... why are you using an access database?

    What code do you currently have for pulling the access database? Since it should be just a matter of changing the path to it (assuming the server has the shared resource mapped as a drive letter).
     
    kblessinggr, Jul 25, 2009 IP
  3. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #3
    kblessinggr ,
    actually access datavase is used for a desktop software. But I need some data from that database and display on my site.
     
    KingCobra, Jul 25, 2009 IP
  4. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If your PHP script is running off a windows server, your best bet is to setup a connection to the access database as an ODBC connection (That user would have to make sure not to move that database file, or turn off their machine though).

    Tutorial here on odbc_connect

    http://www.w3schools.com/PHP/php_db_odbc.asp

    If you only need the data one time, you could export specific data from access perhaps as a CSV and have a php script import it.
     
    kblessinggr, Jul 25, 2009 IP
  5. HivelocityDD

    HivelocityDD Peon

    Messages:
    179
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yea you will have to make use of odbc_connect for this.

    But the better idea will be to use mysql in your desktop machine also

    php is well supported with mysql but not with ms access
     
    HivelocityDD, Jul 25, 2009 IP