web 2.0

How to use PHP & AdoDB Connect to Database

How to use PHP & AdoDB Connect to Database This tutorials/script developing with the PHP Scrips Using ADO Connect to database

ShotDev Focus:
- PHP & AdoDB

Example

php_ado.php


<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<?php
$strConn = new COM("ADODB.Connection") or die("Cannot start ADO");
$strConn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("db/mydatabase.mdb"));
if($strConn)
{
echo "Database Connected";
}
else
{
echo "Database Connect Failed.";
}
$strConn->Close();
$strConn = null;
?>
</body>
</html>

Create a php file and save to path root-path/myphp/

Run
http://localhost/myphp/php_ado.php

Screenshot

PHP & AdoDB Connect to Database
.
.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.