note 71438 added to function.odbc-connect

From: Date: Wed, 29 Nov 2006 03:48:43 +0000
Subject: note 71438 added to function.odbc-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-120149@lists.php.net to get a copy of this message
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 -- https://master.php.net/note/delete/71438/integrated Del: useless -- https://master.php.net/note/delete/71438/useless Del: bad code -- https://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 -- https://master.php.net/note/delete/71438/in+docs Del: other reasons-- https://master.php.net/note/delete/71438 Reject -- https://master.php.net/note/reject/71438 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120149) next »