To connect and show tables in a Microsoft Access data base
(created in *.asp pages)...
$dbq = str_replace("/", "\",
$_SERVER["DOCUMENT_ROOT"]) .
"\path\to\database.mdb";
if (!file_exists($dbq)) { echo "Crap!<br />No
such file as $dbq"; }
$db_connection = odbc_connect("DRIVER={Microsoft Access
Driver (*.mdb)}; DBQ=$dbq",
"ADODB.Connection", "password",
"SQL_CUR_USE_ODBC");
$result = odbc_tables($db_connection);
while (odbc_fetch_row($result)) {
if(odbc_result($result,"TABLE_TYPE")=="TABLE
") {
echo "<br />" .
odbc_result($result,"TABLE_NAME");
}
}
----
Server IP: 66.163.161.117
Probable Submitter: 72.205.62.162
----
Manual Page -- http://www.php.net/manual/en/function.odbc-connect.php
Edit -- https://master
.php.net/note/edit/71438
Del: integrated -- h
ttps://master.php.net/note/delete/71438/integrated
Del: useless -- http
s://master.php.net/note/delete/71438/useless
Del: bad code -- htt
ps://master.php.net/note/delete/71438/bad+code
Del: spam -- https:/
/master.php.net/note/delete/71438/spam
Del: non-english --
https://master.php.net/note/delete/71438/non-english
Del: in docs -- http
s://master.php.net/note/delete/71438/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/71438
Reject -- https://mast
er.php.net/note/reject/71438
Search -- https://
master.php.net/manage/user-notes.php
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|