Howdy, Stranger!

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


dsn-less connection

CrushCrush Member Posts: 43
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?


  • treshrtreshr Member Posts: 326
    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:


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

    Go here to download it:

    Good luck.


Sign In or Register to comment.