Access database software PHP with ADODB library to invoke the modified version of the Access database original

Source: Internet
Author: User
The most important download address, please first look at an article.
http://adodb.sourceforge.net/#download
Download this file locally
This file is extracted and placed in the ADODB directory, preferably all Ah, not only ohtml.inc.php and adodb.inc.php
The references are really as long as these two are available.

Copy the Code code 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:\php\phpaccess\test.mdb ';
$myDSN = ' provider=microsoft.jet.oledb.4.0; '. ' DATA source= '. $access. '; USER id=; password=; ';
Note that 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 ();
?>


database, the normal Access database, as normal, no need to pay attention to what
Test passed. If you have better suggestions, please indicate in the comments

The above describes the Access database software in PHP through the ADODB Library implementation of the modified version of the Access database, including the Access database software content, I hope that the PHP tutorial interested in a friend helpful.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.