P.S.
One of the users there mentions that she had to open the odbc_free_result INTO a 
variable in order for it to work:
$free_result = odbc_free_result($sql_result);  for example

Angie

>>> "Jello" <[EMAIL PROTECTED]> 05/15/01 10:27AM >>>
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: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 
To contact the list administrators, e-mail: [EMAIL PROTECTED] 



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