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:

$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,

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to