PHP

Moderators: None (Apply to moderate this forum)
Number of threads: 1848
Number of posts: 5016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
dsn-less connection Posted by Crush on 26 Aug 2004 at 4:31 AM
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?
Report
Re: dsn-less connection Posted by treshr on 27 Aug 2004 at 5:58 AM
You can try this code:
<?PHP

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

    $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";
         $rs->MoveNext();
    }

    print "</table>";

    $rs->Close();
    $conn->Close();
    $rs = null;
    $conn = null;
?> 


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


--=][tReShR][=--

Report
Re: dsn-less connection Posted by Crush on 30 Aug 2004 at 3:50 AM
thanks a lot :)
well, i found out that mysql is better and faster anyway...
even though the gui sucks. :(
Report
Re: dsn-less connection Posted by treshr on 30 Aug 2004 at 6:11 AM
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.

--=][tReShR][=--




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.