freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Warning: odbc_fetch_row(): 6 is not a valid ODBC result resource in /var/www/localhost/htdocs/customer.microprecision.com/invlist.php on line 81
- From: Ran September <ran.september AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Warning: odbc_fetch_row(): 6 is not a valid ODBC result resource in /var/www/localhost/htdocs/customer.microprecision.com/invlist.php on line 81
- Date: Wed, 25 Feb 2009 01:56:41 -0800
Thanks for the reply.
i'll do what you've said... thanks again for helping.
On Tue, Feb 24, 2009 at 7:21 PM, James K. Lowden <jklowden AT freetds.org> wrote:
> Ran September wrote:
>> i don't know where i went wrong, my script seems alright and i'm
>> pretty sure that i prevented the "Multiple active statement" thing (at
>> least that's what i believed)
>>
>> $conn=odbc_connect($db_host,$db_user,$db_pass);
>> $sql="SELECT * FROM invoice where customer = '$custid' AND
>> INVOICE.WO_CUSTOM2 != 'MPTE'";
>> $rs=odbc_exec($conn,$sql);
>> if (!$rs)
>> {exit("Error in SQL");} (---------------------->>> the connection
>> worked! <<<---------------------------)
>> ?>
>>
>> odbc_binmode($rs, ODBC_BINMODE_PASSTHRU);
>> odbc_longreadlen($rs, 100384); /* Allow 16kb thru */
>> while (odbc_fetch_row($rs)) (--------------------->>> this
>> is where the error pointed at <<<------------------)
>
> Try looking at a TDSDUMP log of the session; see if any error message is
> generated in response to odbc_longreadlen. (I'm not a PHP programmer, but
> do odbc_binmode() and odbc_longreadlen() not have return codes?) You
> might also try using the ODBC trace.
>
> Four our purposes here, you need to isolate the ODBC function call that is
> not working as expected. Then we can see what is reasonable to expect,
> and what kind of change or righteous indignation would be appropriate.
>
>> and also, using freetds, can it load pdf files? if yes, is there a
>> limit from loading big files? because it worked on windows i mean when
>> the time that i didn't have to use freetds driver.
>
> Yes, it should work. You're limited by available memory -- more than one
> copy of the file is kept in memory -- and newer versions are better at it
> than older ones. I don't know how well ODBC parameterized queries work
> with large parameters. Here again an ODBC trace and TDSDUMP should shed
> some light.
>
> HTH.
>
> --jkl
>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
--
R
-
[freetds] Warning: odbc_fetch_row(): 6 is not a valid ODBC result resource in /var/www/localhost/htdocs/customer.microprecision.com/invlist.php on line 81,
Ran September, 02/23/2009
-
Re: [freetds] Warning: odbc_fetch_row(): 6 is not a valid ODBC result resource in /var/www/localhost/htdocs/customer.microprecision.com/invlist.php on line 81,
James K. Lowden, 02/24/2009
- Re: [freetds] Warning: odbc_fetch_row(): 6 is not a valid ODBC result resource in /var/www/localhost/htdocs/customer.microprecision.com/invlist.php on line 81, Ran September, 02/25/2009
-
Re: [freetds] Warning: odbc_fetch_row(): 6 is not a valid ODBC result resource in /var/www/localhost/htdocs/customer.microprecision.com/invlist.php on line 81,
James K. Lowden, 02/24/2009
Archive powered by MHonArc 2.6.24.