RE: [PHP-DB] ODBC connection under Win32 + Apache + SQL Server

From: Date: Wed, 12 Sep 2001 13:57:03 +0000
Subject: RE: [PHP-DB] ODBC connection under Win32 + Apache + SQL Server
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-12370@lists.php.net to get a copy of this message
Victor, Your DSN is not being passed correctly. Under unix this could be an envrionment variable issue, but I suspect that you just have a reference error. Try something like: $dsn="MQIS"; $pwd="sa"; $conn=odbc_connect("$dsn","$pwd",""); if that doesn't work, try $dsn="dsn=MQIS"; Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access & Data Integration Technology Providers > -----Original Message----- > From: Victor Espina [mailto:vespina@olimpo-soft.com] > Sent: Tuesday, September 11, 2001 11:55 PM > To: php-db@lists.php.net > Subject: [PHP-DB] ODBC connection under Win32 + Apache + SQL Server > > > Hi, i'm new using PHP i'm trying to run some basic PHP scripts to > retrieve a > show data coming from a SQL Server database. The problem is that > when i try > to run this: > > $conn=odbc_connect("MQIS","sa",""); > > PHP returns the following warning: > > Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not > found and no default driver specified > > I test the DSN with VFP using: > > SQLStringConnect("dsn=MQIS;usr=sa;pwd=;") > > and it works pretty fine. ¿What could be the problem here? > > TIA > > Victor > > -- > ============================== > Victor Espina > Caracas, Venezuela > http://mitrompo.com/vespina > vespina@nospam.mitrompo.com > (Quite el 'nospam' para responder) > (Remove 'nospam' to reply) > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.db (#12370) next »