RE: [PHP-DB] ODBC MS SQL Server 7
| From: | Andrew Hill | Date: | Mon, 24 Dec 2001 15:05:08 +0000 |
| Subject: | RE: [PHP-DB] ODBC MS SQL Server 7 | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-15209@lists.php.net to get a copy of this message | ||
Javalina,
What is the exact error message your are getting?
Also, try the "odbctest" sample program with the "select * from frases"
query - does it return results?
Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers
> -----Original Message-----
> From: Javalina [mailto:javalina@entelchile.net]
> Sent: Friday, December 21, 2001 7:51 AM
> To: php-db@lists.php.net
> Subject: [PHP-DB] ODBC MS SQL Server 7
>
>
> Hi to all...please can you help me ...because i cant retrieve any row
> of the database on MS SQL Server 7 with ODBC . i did use Openlink
> driver on a Solaris 6 machine (Sparc) , the database are on WIN NT4.0
>
> my code is.
>
> <?
> /* some environment variables, you can test to comment them out to see
> if things
> * still work.
> */
> putenv("LD_LIBRARY_PATH=/base/odbc/lib:$LD_LIBRARY_PATH");
> putenv("UDBCINI=/base/odbc/bin/udbc.ini");
> putenv("ODBCINI=/base/odbc/bin/odbc.ini");
> putenv("DebugFile=/tmp/udbc.out"); // debug trace output
>
> $dsn="NT"; // note 'DSN=' is required
> $user="shark";
> $password="shark";
>
> $sql="select * from frases ";
>
> $connect_odbc=odbc_connect($dsn,"shark","shark",SQL_CUR_USE_ODBC) or
> die("Erreur
> de connexion au serveur");
> if (!odbc_autocommit($connect_odbc, TRUE)) {
> echo 'pb auto_commit';
> return;
> }
> // selection avant
> $Req_hebd = "select * from frases ";
> echo $Req_hebd .'<br>';
>
> if (!($Res_hebd=odbc_prepare($connect_odbc,$Req_hebd))) {
> echo 'pb prepare';
> }
> if (!odbc_execute($Res_hebd)) {
> echo 'pb execute';
> }
> if (!($res=odbc_result_all($Res_hebd))) {
> echo 'pb result_all';
> }
>
> ?>
> this code reply "NO ROWS FOUND" , the connection are OK...the databse
> have many rows(of course)..
>
> Thank's a lot.
>
> Cristian
>
> --
> 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
>
>
>