Re: odbc_connect unknown error

From: Date: Thu, 20 Sep 2007 19:28:57 +0000
Subject: Re: odbc_connect unknown error
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-28496@lists.php.net to get a copy of this message
I'd check the following in order... 1) Does the user running the web process have access to the file using the path provided? 2) Did you set the DSN as a System DSN? 3) Try using a DSN-less connection, namely: $dsn = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" + $fullpathtodb; $con = odbc_connect($dsn,$user,$pass) or die(odbc_error()); John On 9/19/07, Alexander Fradiani <a_fradiani@hotmail.com> wrote: > > Hello!. > > I have a problem when trying to connect to an access database: > > $con = odbc_connect($dsn,$user,$pass) or die(odbc_error()); > > the error message i get is just this: > IM002 > > the $dsn var only contains the name of a data source previously created from the windows > control panel. > i already tested the $dsn making a connection with visual basic code and it works fine. > Also the user and pass are right. so i dont know what could be the problem. > > I am using PHP 5.2.4-win32. with apache 2.2.4. > > I really appreciate any help on this. > Alexander > _________________________________________________________________ > Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! > > http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us -- -- John Mertic "Explaining a joke is like dissecting a frog: you jmertic@gmail.com understand it better, but the frog dies in the process." -Mark Twain

« previous php.windows (#28496) next »