Revised version of calling Access database through ADODB library in PHP Original_PHP Tutorial

WBOY
Release: 2016-07-21 15:58:48
Original
933 people have browsed it

The most important download address, please read the previous article first.
http://adodb.sourceforge.net/#download

Local downloadRevised version of calling Access database through ADODB library in PHP Original_PHP Tutorial Download this file
Unzip this file and put it in the adodb directory. It is best to include all of them, not just ohtml.inc.php and adodb.inc.php
You only need to quote these two

Copy code The code is as follows:

include('adodb/tohtml.inc.php'); // load code common to ADODB
include('adodb/adodb.inc .php'); // load code common to ADODB
$db = &ADONewConnection("ado_access");
print "

Connecting $db->databaseType...

" ;
$access = 'E:phpphpaccesstest.mdb';
$myDSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;'.'DATA SOURCE='. $access.';USER ID=;PASSWORD =;';
//Note, the mdb address is a physical address
if (@$db->PConnect($myDSN, "", "", "")) {
print "ADO version=".$db->_connectionID->version.";
";
$sql = 'select thename from news';
$rs = $db ->Execute($sql);
rs2html($rs,'border=2 cellpadding=3',array('Customer Name','Customer ID'));
} else print "ERROR: Access test requires a Access database $access".';
'.$db->ErrorMsg();
?>

What about the database, ordinary access database, and normal The same, no need to pay attention to anything
The test passed. If you have any better suggestions, please point them out in the comments

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/317511.htmlTechArticleThe main download address, please read the previous article first. http://adodb.sourceforge.net/#download Local download Download this file After decompressing this file, place it in the adodb directory, preferably all...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!