複製程式碼 程式碼如下:
/*
>$conn = @new COM("ADODB.Connection") or die ("ADO Connection faild.");
$connstr = "DRIVER Access Driver ("DATUM/cnbt.mdb");
$conn->Open($connstr);
/*
建立記錄集查詢
*/
$rs = @new COM( "ADODB.RecordSet");
$rs->Open("select * from dbo_dirs",$conn,1,3);
/*
循環讀取資料
*/
*/
while(!$rs->eof){
echo "$rs->Fields["title"]->Value;
echo "
";
$rs->Movenext( ); //將記錄集指標下移
}
$rs->close();
?>