dsn-less connection

hello. i have this access database and i want to connect to it without using the stupid dsn... can anyone please help?
and would that be possible on linux?


  • You can try this code:

    $conn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=".realpath("c:/test.mdb");

    $query = "SELECT name,salary FROM emp ";
    $rs = $conn->execute($query);
    $name = $rs->Fields(0);
    $sal = $rs->Fields(1);

    print "Name-------Salary";

    while (!$rs->EOF)
    echo $name->value";
    echo $sal->value";

    print "";

    $rs = null;
    $conn = null;

    Or you can visit this website to get more info: http://www.phpfreaks.com/tutorials/104/1.php


  • thanks a lot :)
    well, i found out that mysql is better and faster anyway...
    even though the gui sucks. :(
  • Did you try to use the MySQL Control Center. Works like a charm and it's free !!!

    Go here to download it: http://dev.mysql.com/downloads/other/mysqlcc.html

    Good luck.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!