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
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
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


a copy of the whole script is below....


// 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

// execute SQL statement and get results
$sql_result = odbc_execute($sql_prepare) or die("Couldn't execute

// echo the result in a nice table

// free up  resources
odbc_free_result ($sql_result);

// close connection


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to