Re: Problems setting up a DSN

From: Date: Fri, 28 Sep 2001 01:51:05 +0000
Subject: Re: Problems setting up a DSN
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-9585@lists.php.net to get a copy of this message
Daniel, If you are accessing an Access 2k database, I would use OLEDB rather than ODBC. With this you would not require a DSN, and the speed is greater. ex. $conn = new COM("ADODB.Connection"); $connString = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=F:\someMDB.MDB;User Id=Foo;Password=Bar'; $conn->Open($connString); $rs = $conn->Execute("SomeSQL"); $conn->Close(); "Daniel Parsons" <daniel.parsons@imlnetwork.com> wrote in message news:BGEJJKPALPIPJFCEDFNLMECKCBAA.daniel.parsons@imlnetwork.com... > Hi, > > I'm running PHP 4.0 on WinNT 4 with IIS and attempting to use an Access > 2000 database. When I use this is a script: > > $logdb = odbc_connect("uptime", "user", "password"); > > it gives the following error : > > Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name > not found and no default driver specified, SQL state IM002 in > SQLConnect in D:\Inetpub\wwwroot\daniel\showuptime.php on line 20 > > I have set up a System DSN with the name 'uptime' in the ODBC > connections on the server and just can't figure out why it isn't finding > it. I haven't rebooted the server since adding the DSN but it is running > some other stuff that means rebooting is really a last resort thing. > > Can anyone enlighten me to the really small obvious thing that I have > probably overlooked? > > Cheers, > Daniel >

« previous php.windows (#9585) next »