欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

php adodb连接带密码access数据库实例,测试成功_PHP教程

程序员文章站 2022-06-05 13:26:41
...
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].'
';
$recordSet->MoveNext();
}

$recordSet->Close(); # 选择性执行
$db->Close(); # 选择性执行
?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/319014.htmlTechArticle? include('./class/adodb/adodb.inc.php'); //实例化db类,链接 $db=ADONewConnection('ado_access'); $access=realpath('./rs.mdb'); $myDSN='PROVIDER=Microsoft.Jet.OLEDB.4.0;'.'DATAS...