Re: [PHP-DEV] Small comments and suggestions on PHP3-ODBC From: Andreas Karajannis (Andreas.Karajannis <email protected>)
Date: 07/12/99

Kriván Miklós wrote:
>
> Key points of changes:
> 1. Instead of using HAVE_SQL_EXTENDED_FETCH compiler directive I suggest
> to use
> runtime variable "conn_ptr->fetch_abs" which is used in the source.
The compiler directive was chosen to be able to link against the Solid
client libraries that don't have SQLExtendedFetch.
It would be possible to include a wrapper function in case Solid is
used.

> 2. Using SQLDriverConnect instead of SQLConnect. The decision would not
> based on
> compiler directive but the parameter string like "DSN=anydsn;". I do
> not know
> exactly how would be the best. The implementation from version 3.0.6
> try to apply something like what my imagination is. The method what I
> have implemented in the connect function is just a trial not a detailed
> and discussed solution.
I didn't use SQLDriverConnect() due to a bug in the Adabas odbc library.
The idea to decide which connect function to use depending on the
parameter string sounds reasonable.

> 3. SQLDescribeParam was not supported by MS Access so I tried to do
> something
> to work with that. It has only meaning in insert and update
> statements.
I never tried Access, but does your change affect other database
drivers?
 
> 4. To execute SQLBindCol
> was sometime (using some ODBC driver) unsuccessful before SQLExecute so
>
> I moved it after SQLExecute.
>
This seems to be a good idea, modern drivers don't contact the server
for a prepare, only for execution.

I think that the odbc stuff in general needs a rework, but I will wait
for
PHP4 before starting this.

-Andreas

-- 
Andreas Karajannis
GMD National Research Center for Information Technology
Schloss Birlinghoven, D-53754 Sankt Augustin
Phone +49 2241 142948

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>