Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PHP-DB] odbc_num_rows fails when HAVE_SQL_EXTENDED_FETCH is
If HAVE_SQL_EXTENDED_FETCH is defined, then the odbc ext will use the
ODBC API function SQLExtendedFetch instead of SQLFetch to retrieve
records. SQLExtendedFetch is only necessary if a forward-only cursor is
not being used.  In the case of the odbc ext, it uses a dynamic cursor if
HAVE_SQL_EXTENDED_FETCH is defined.  The problem is that dynamic cursors
have the worst performance, while forward-only cursors have the best
performance.  However, forward-only cursors do not allow you to
predetermine the number of rows. This is why you are getting -1 from
odbc_num_rows().  A static cursor should have been used instead of a
dynamic cursor.  While it is not faster than forward-only, it is faster
than dynamic, and still allows you to get a row count.

-- bob

On Thu, 26 Aug 2004, Mahmut Eren wrote:

> Hi,
> I'm using php-4.3.3 on mandrake Linux. I had a performance problem access=
ing to DB2 databases on As400 systems. When I searched the internet I found=
out that commenting out '#define HAVE_SQL_EXTENDED_FETCH 1' lines from php=
_odbc_includes.h file could solve the problem. I edited the file and recomp=
iled php; the result was a much better performance. But this time odbc_num_=
rows() statement fails and always returns -1. How can I solve this problem?=
Any suggestions?
> Thanks in advance
> Mahmut Eren
>
>  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D-
> Bu e-posta ece yukarida isimleri belirtilen kisiler arasinda =F6zel ha=
berlesme amacini tasimaktadir. Size yanlislikla ulasmissa l=FCtfen g=F6nder=
en kisiyi bilgilendiriniz ve mesaji sisteminizden siliniz. Turkiye Cumhuriy=
et Merkez Bankasi A.S. bu mesajin icerigi ile ilgili olarak hicbir hukuksal=
sorumlulugu kabul etmez.
>
> This e-mail communication is intended for the private use of the people n=
amed above. If you received this message in error, please immediately notif=
y the sender and delete it from your system. The Central Bank of The Republ=
ic of Turkey does not accept legal responsibility for the contents of this =
message.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Robert Twitty
08-26-04 08:58 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP DB archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:53 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.