Re: [PHP4BETA] cvs: php4 /ext/odbc/ php_odbc.c

[email protected] (André Langhorst)
Newsgroups php.version4
Organization ITBNet - http://www.itbnet.de
Message-ID <[email protected]>
Hi Andreas,
because I had this *while* problem, is it existent anymore (infinite 
loops) and is it available in the official PHP4 distribution? I´m not 
able to test it at the moment, because I´ve no ODBC to Adabas today.
I´m no C-expert but the code looks like is it fixed...

Regards,
andré

wrote:

> Nick Gorham wrote:
> > 
> > Hmm
> > 
> > not sure where the "while ( henv != SQL_NULL_HENV )" has come from there, I added
> > the code to retrieve all the errors, And I think it should be allowed to stay. You
> > often get a "driver not capable" error when connecting, this hides the real errors
> > that may happen. When I added this the code read
> > 
> > #if !defined (HAVE_ADABAS)
> >     do {
> > #endif
> >         ret = SQLError(henv, conn, stmt, state,
> >                 &error, errormsg, sizeof(errormsg)-1, &errormsgsize);
> >         if (func) {
> >             php_error(E_WARNING, "SQL error: %s, SQL state %s in %s",
> >                    errormsg, state, func);
> >         } else {
> >             php_error(E_WARNING, "SQL error: %s, SQL state %s",
> >                     errormsg, state);
> >         }
> > #if !defined (HAVE_ADABAS)
> >     } while (SQL_SUCCEEDED(ret));
> > #endif
> > 
> > The !defined HAVE_ADABAS was added later. Would anyone object if it went back to
> > that state ?
> > 
> 
> I see your point, but many drivers are buggy regarding SQLError(), since
> the do ... while above causes them to go into an infinte loop, never
> returning SQL_NO_DATA_FOUND. This behaviour comes with Adabas (therefore
> HAVE_ADABAS which has magically dissapeared and was replaced by "while (
> henv != SQL_NULL_HENV )" by whoever), DBMaker, and probably Oracle
> (Win32).
> I think this "feature" sent IIS on my NT box to Nirvana while testing
> the 4.0 release binaries ;-).
> 
> -Andreas
> 
> -- 
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> To contact the list administrators, e-mail: [email protected]
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.