On 4/9/07, mandark <[EMAIL PROTECTED]> wrote:

> I just want to know how to connect MS Access sa
> php.

Heres a sample code
(from http://www.actionscript.org/forums/showthread.php3?s=&threadid=21969
)

<?php
$db_conn = new COM("ADODB.Connection");
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=".
realpath("./Northwind.mdb").";";
$db_conn->open($connstr);
$rS = $db_conn->execute("SELECT * FROM Employees");
$f1 =  $rS->Fields(0);
$f2 =  $rS->Fields(1);
while (!$rS->EOF)
{
   print $f1->value." ".$f2->value."<br />\n";
   $rS->MoveNext();
}
$rS->Close();
$db_conn->Close();
?>

the code above uses the ms ado com object, which will run only on ms
windows platforms.


May I suggest using MySql so that you can run your program on multiple
platforms (linux, unix, etc..)

>  Anyone knows how to convert MS Access to MySQL

try using mysql migration toolkit. it will help you convert ms access
(data and schema) to mysql. link is shown below

http://dev.mysql.com/downloads/gui-tools/5.0.html



--

-------------------------------------------------------------------------------
ロアボレ, アンドル
Linux Registered User #395151
JITSE/PhilNITS (FE05-0005)
_________________________________________________
Kagay-Anon Linux Users' Group (KLUG) Mailing List
[email protected] (http://cdo.linux.org.ph)
Searchable Archives: http://archives.free.net.ph


aside from com(), what other method that i could used that can run in
different platforms

--
ArchAngel
_________________________________________________
Kagay-Anon Linux Users' Group (KLUG) Mailing List
[email protected] (http://cdo.linux.org.ph)
Searchable Archives: http://archives.free.net.ph

Reply via email to