Re: php odbc

From: Date: Sun, 04 Jun 2000 07:53:39 +0000
Subject: Re: php odbc
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-186@lists.php.net to get a copy of this message
you need to set a DSN before running ODBC queries. This can be done in the control panel, add the desired driver (according to the database you are using) and set the path to the database in the DSN. Than use the odbc_connect function in order to connect to the dsn you have just created, the DSN will connect the PHP with the database. Sincerely, David Treves. ----- Original Message ----- From: Maurizio Piccolo <mpiccolo@bci.it> To: <php-db@lists.php.net> Sent: Friday, June 02, 2000 4:12 PM Subject: [PHP-DB] php odbc > > Hi everybody, I'm new to PHP4 and I'm trying my first connection to an > odbc database > I've created an ms-access file named Test.mdb, run this php file > > <? > $conn=odbc_connect("test","",""); > $res=odbc_exec($conn,"select * from anni"); > odbc_result_all($res); > odbc_close($conn); > ?> > > Warning: SQL error : [Microsoft][ odbc driver manager] Name source data > not found and default driver not specified., SQL state IM002 in > sqlConnect > > Do I have to enable something in the php.ini ? > > > -- > 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 (#186) next »