FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


HOW TO CONNECT MY SITE TO AN ACCESS DATA BASE??





drtooty
WHAT IS THE BEST WAY TO CONNECT MY SITE TO AN ACCESS DATA BASE????


NB: AM WEB SITE BEGINNER
a_dubDesign
php all the way. Its really simple language, and since its free everybody has it. php.net is a huge list of all the different functions reltaed to database info, just go there and do a search.
ml
This is an example of how you can pull data from a Microsoft Access database through ADO.

Code:
<?
$conn = new COM("ADODB.Connection") or die("Cannot start ADO");

// Microsoft Access connection string.
$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\\inetpub\\wwwroot\\php\\mydb.mdb");

// SQL statement to build recordset.
$rs = $conn->Execute("SELECT myfield FROM mytable");
echo "<p>Below is a list of values in the MYDB.MDB database, MYABLE table, MYFIELD field.</p>";

// Display all the values in the records set
while (!$rs->EOF) {
    $fv = $rs->Fields("myfield");
    echo "Value: ".$fv->value."<br>\n";
    $rs->MoveNext();
}
$rs->Close();
?>
dkill001
what luck...I just did this today, quite simple actually - here is a tutorial http://www.phpbuilder.com/columns/siddarth20000228.php3...it uses ODBC to connect....you can connect via a DSNless connection also(ie via ADODB like mentioned above)...I am not sure of the advantages/disadv b/w the diff connection methods
Related topics
PHP NUKE
script backup database
Hey everybody ;) HTML or Blog?
Booting time
Implementing your database access in PHP as a layer.
submit to search Engine
Using databases
Best FTP Client on EARTH
VBulletin Portal Installing
google
error: 1146 data base not found some one can help???
data access page in the internet
how to connect vb6 to mysql remotely?
Site Diagnostics
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Design Tips

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.