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

2001-09-18 Thread Arno Welzel

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:



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2001-09-18 Thread Niklas Lampén

Try:
$odbcId = odbc_connect("phpodbc.dsn", "admin", "");


Niklas

-Original Message-
From: A. op de Weegh [mailto:[EMAIL PROTECTED]]
Sent: 18. syyskuuta 2001 10:57
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Can I use Microsoft Access as a database?


Thanks, but since I am unfamiliar using this kind of database connection, I
was hoping you could help me out some more.

I did the following. In the ODBC Data Source Administrator of Windows 98 I
have created a new file DSN. This DSN is configured to use a certain Access
2000 database on one of my harddisks. The DSN is called 'phpodbc.dsn'. Then,
in the file odbc.php I do the following:



When I access this PHP file with Internet Explorer, I get the following
error message:
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified, SQL state IM002 in SQLConnect in
C:\Inetpub\wwwroot\odbc.php on line 3.

Any ideas?

Thanks,
Alex


"Niklas lampén" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I think that ODBC is your solution.
>
>
> Niklas
>
> -Original Message-
> From: A. op de Weegh [mailto:[EMAIL PROTECTED]]
> Sent: 15. syyskuuta 2001 13:05
> To: [EMAIL PROTECTED]
> Subject: [PHP] Can I use Microsoft Access as a database?
>
>
> Hi all,
> for testing purposes in a school environment, I would like to use a
> Microsoft Access database with PHP. I know how to connect to and use a
MySQL
> database, but I can't find any functions for accessing Microsoft Access
> databases.
>
> Can anyone help me out here?
>
> Thankx,
> Alex
>
> --
> PS: Replace the underscore (_) in my e-mail address with a minus sign (-).
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2001-09-18 Thread A. op de Weegh

Thanks, but since I am unfamiliar using this kind of database connection, I
was hoping you could help me out some more.

I did the following. In the ODBC Data Source Administrator of Windows 98 I
have created a new file DSN. This DSN is configured to use a certain Access
2000 database on one of my harddisks. The DSN is called 'phpodbc.dsn'. Then,
in the file odbc.php I do the following:



When I access this PHP file with Internet Explorer, I get the following
error message:
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified, SQL state IM002 in SQLConnect in
C:\Inetpub\wwwroot\odbc.php on line 3.

Any ideas?

Thanks,
Alex


"Niklas lampén" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I think that ODBC is your solution.
>
>
> Niklas
>
> -Original Message-
> From: A. op de Weegh [mailto:[EMAIL PROTECTED]]
> Sent: 15. syyskuuta 2001 13:05
> To: [EMAIL PROTECTED]
> Subject: [PHP] Can I use Microsoft Access as a database?
>
>
> Hi all,
> for testing purposes in a school environment, I would like to use a
> Microsoft Access database with PHP. I know how to connect to and use a
MySQL
> database, but I can't find any functions for accessing Microsoft Access
> databases.
>
> Can anyone help me out here?
>
> Thankx,
> Alex
>
> --
> PS: Replace the underscore (_) in my e-mail address with a minus sign (-).
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2001-09-16 Thread Niklas Lampén

I think that ODBC is your solution.


Niklas

-Original Message-
From: A. op de Weegh [mailto:[EMAIL PROTECTED]]
Sent: 15. syyskuuta 2001 13:05
To: [EMAIL PROTECTED]
Subject: [PHP] Can I use Microsoft Access as a database?


Hi all,
for testing purposes in a school environment, I would like to use a
Microsoft Access database with PHP. I know how to connect to and use a MySQL
database, but I can't find any functions for accessing Microsoft Access
databases.

Can anyone help me out here?

Thankx,
Alex

--
PS: Replace the underscore (_) in my e-mail address with a minus sign (-).



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2001-09-16 Thread A. op de Weegh

Hi all,
for testing purposes in a school environment, I would like to use a
Microsoft Access database with PHP. I know how to connect to and use a MySQL
database, but I can't find any functions for accessing Microsoft Access
databases.

Can anyone help me out here?

Thankx,
Alex

--
PS: Replace the underscore (_) in my e-mail address with a minus sign (-).



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]