<?
include('./class/adodb/adodb.inc.php');
//實例化db類,鏈接
$db = ADONewConnection('ado_access');
$access = realpath('./rs.mdb');
$myDSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;'.'DATA SOURCE='. $access . ';'."Jet OLEDB:Database Password=123456;";
$db->Connect($myDSN);
$recordSet = $db->Execute('select * from tt');
if (!$recordSet)
print $db->ErrorMsg();
else
while (!$recordSet->EOF) {
print $recordSet->fields[0].' '.$recordSet->fields[1].'<BR>';
$recordSet->MoveNext();
}
$recordSet->Close(); # 選擇性執行
$db->Close(); # 選擇性執行
?>