Results 1 to 7 of 7

Thread: Connecting to .mdb in PHP

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2003
    Location
    Auckland
    Posts
    1,139

    Connecting to .mdb in PHP

    Does anyone know how I can connect to a .MDB in PHP??? does anyone have a code??

  2. #2
    Fanatic Member noielen's Avatar
    Join Date
    Nov 2005
    Location
    Cebu, Phil.
    Posts
    680

    Re: Connecting to .mdb in PHP

    noister
    <advertising link removed by moderator>

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2003
    Location
    Auckland
    Posts
    1,139

    Re: Connecting to .mdb in PHP

    Yeah but wqe have a problem.....

    Code:
    <?php
    $database = 'db1.mdb';
    $user = '';
    $password = '';
    
    $conn = db2_connect($database, $user, $password);
    
    if ($conn) {
       echo "Connection succeeded.";
       db2_close($conn);
    }
    else {
       echo "Connection failed.";
    }
    ?>
    Fatal error: Call to undefined function: db2_connect() in /home/rlnz/public_html/admin/zz.php on line 6

  4. #4
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: Connecting to .mdb in PHP

    Isn't this a Visual Basic Forum or am I lost
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Connecting to .mdb in PHP

    I would set up an ODBC driver for the Access database and use the built in ODBC functions.

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Connecting to .mdb in PHP

    Moved to PHP forum

  7. #7
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Connecting to .mdb in PHP

    ODBC is your best option, because it manages concurrent access to the file. This is something that Access is not good at at the best of times.

    My advice is, DON'T use Access.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

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