<?php
$connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" . realpath("../DataBase/myclass.mdb");
$conn = @new COM("ADODB.Connection");
$conn->Open($connstr);
//$conn = @new COM("ADODB.Connection") or die ("ADO连接失败!");
//$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("../DataBase/myclass.mdb");
//$conn->Open($connstr);
$rs = @new COM("ADODB.RecordSet");
$rs->Open("select * from Idioms",$conn,1,3);
while(!$rs->eof())
{
echo $rs->Fields["IdiomName"]->Value . "<br />";
$rs->Movenext();
}
//$rs->AddNew();
//$rs->Fields["IdiomTitle"]="ssss";
//$rs->Fields["IdiomName"]="生生世世";
//$rs->Update();
$rs->close();
//$conn->execute("delete * from Idioms where IdiomId = 47");
//$rs = @new COM("ADODB.RecordSet");
//$rs->Open("select * from blog_Content",$conn,1,3);
//echo $rs->Fields["log_Title"]->Value; //输出log_Title字段
//echo "<br/>";
//$rs->Movenext(); //将记录集指针下移
//echo $rs->Fields["log_Title"]->Value;
//$rs->close();
?>