RE: [PHP-DB] odbc errors

From: Date: Tue, 15 May 2001 16:44:06 +0000
Subject: RE: [PHP-DB] odbc errors
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9326@lists.php.net to get a copy of this message
Jello, It appears that your odbc_connect is not happening :) Can you post your code? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access & Data Integration Technology Providers > -----Original Message----- > From: Jello [mailto:jerry23@madasafish.com] > Sent: Tuesday, May 15, 2001 11:27 AM > To: php-db@lists.php.net > Subject: [PHP-DB] odbc errors > > > i've just upgraded my computer... running win ME ( i know), PWS and PHP > 4.0.5 and access 2000 (odbc) ... the same set up as my last > one... i keep > getting error msg from scripts that worked only last week on the old > setup... > the DB is ok as it will connect prepare and execute with no error... but > then i get the following msg's > > > Warning: Supplied argument is not a valid ODBC result resource in > \include\db1.txt on line 18 > > which is > odbc_result_all($sql_result,"border=1"); > nothing to fancy there > > and the same message > Warning: Supplied argument is not a valid ODBC result resource in > \include\db1.txt on line 21 > > which is > odbc_free_result ($sql_result); > again just a basic action... nothing fancy > > > it's strange as all the other bits of the scripts work with no > problems so i > think its the ODBC set up. but that is where i step out of the > light in to a > very dark room and it's driving me nuts...any help or pointers would be > cool... > > MTIA > Jello > > a copy of the whole script is below.... > > > <?php > > // connect to system dsn odbc name login and password or die > $connect = odbc_connect("db1","login","pword") or die (" not > connected"); > > // create SQL statement > $sql = "SELECT id,code,matchcode FROM products "; > > > // prepare SQL statement > $sql_prepare = odbc_prepare($connect,$sql) or die("Couldn't prepare > query."); > > // execute SQL statement and get results > $sql_result = odbc_execute($sql_prepare) or die("Couldn't execute > statement."); > > > // echo the result in a nice table > odbc_result_all($sql_result,"border=1"); > > // free up resources > odbc_free_result ($sql_result); > > // close connection > odbc_close($connect); > > > > ?> > > > > -- > 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 (#9326) next »