RE: [PHP] Can I use Microsoft Access as a database?

From: Date: Tue, 18 Sep 2001 11:40:57 +0000
Subject: RE: [PHP] Can I use Microsoft Access as a database?
Groups: php.general 
Request: Send a blank email to php-general+get-67696@lists.php.net to get a copy of this message
First you have to define a *system* data source (DSN) with the ODBC control panel applet - e.h. with the name "accessdb". Be sure, that *other* applications are able to use this data source as well, before you try to access via PHP (e.g. with Excel, which comes with a data query tool to import data from ODBC data sources or MSQUERY). Then you open the connection as follows, *without* user or pw: <?php $odbcId = odbc_connect("accessdb", "", ""); ?> The error "Data source name not found and not default..." means, that the name of the given data source was not found in the system DSNs. It has to be a system DSN, because PHP runs within another user context (e.h. IUSR_... if you use PHP and IIS or the System Account, if you use PHP and Apache), which does not have the *user* DSNs, which you as a user defined for yourself. Hope this helps, Arno

« previous php.general (#67696) next »