Re: dsnless connection
| From: | Ed Meyer | Date: | Wed, 03 Jan 2001 19:19:39 +0000 |
| Subject: | Re: dsnless connection | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4769@lists.php.net to get a copy of this message | ||
An addition to this last message. If you use the ASP instructions for doing
a DSNless connection you can tell the system is trying but you get this
error message:
Warning: SQL error: [Microsoft][ODBC Driver Manager] Invalid string or
buffer length, SQL state S1090 in SQLConnect in c:\program files\apache
group\apache\htdocs\accesstest.php on line 14
So I apparently have the syntax wrong somewhere. According to Microsofts
website:
http://support.microsoft.com/support/kb/articles/q193/3/32.asp
I used this format in my PHP page
<?php
$cnx = odbc_connect ('DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=c:\db\test.mdb', '', '');
?>
If you have a userid or password they go between the second and third sets
of ' '.
I've tried moving around the quotes and things but I always get the same
error message. If I use the DSN connection established on the machine it
works great.
<?php
$cnx = odbc_connect ('test', '', '')
?>
Thanks in advance for any info!
Ed Meyer
Smarts Broadcast Systems
----- Original Message -----
From: "Ed Meyer" <edmeyer@smartsbroadcast.com>
To: "Ertan Tike" <ertant@eczacibasi.com.tr>; <php-windows@lists.php.net>
Sent: Wednesday, January 03, 2001 11:32 AM
Subject: Re: [PHP-WIN] dsnless connection
> I don't know how similar PHP and ASP are but the only examples I can find
of
> DSN Less connections are for ASP pages. I'll need to access information
in
> an Acess Database soon so I'll be working on it. Along this line has
anyone
> been able to access an MS Access db from a PHP page running on
Linux/Apache?
> I'm using PHP and Interbase currently but a lot of information here is
> stored in MS Access tables (ironically on a Samba partition on the Linux
> server). All of the PHP examples talk about setting up the DSN and using
> the ODBC connection. Are there ODBC drivers for Linux? ANy input would
be
> helpful.
>
> Thanks!
>
> Ed Meyer
> Smarts Broadcast Systems
> ----- Original Message -----
> From: "Ertan Tike" <ertant@eczacibasi.com.tr>
> To: <php-windows@lists.php.net>
> Sent: Wednesday, January 03, 2001 3:18 AM
> Subject: [PHP-WIN] dsnless connection
>
>
> > anyone can give example dsnless connection string to mssql server with
nt
> > authorization?
> > thanx..
> >
> >
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net