Small comments and suggestions on PHP3-ODBC
| From: | Kriván Miklós | Date: | Mon, 12 Jul 1999 09:27:53 +0000 |
| Subject: | Small comments and suggestions on PHP3-ODBC | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-8380@lists.php.net to get a copy of this message | ||
Dear Development Team,
I work with PHP3 for a long time and I like it so much. Thank you very
much
all of your work. I use most of the time in PHP3 the ODBC connectivity
features.
I used MySQL-MyODBC on RedHat 5.2 Linux, Oracle-RDB-ODBC on NT4 and
MS Access on Windows 95/NT. In order to work with all of that I had to
do some very small changes in the source "unified_odbc.c" code. I think
that
this solution can help to somebody else also that is why I send this
letter
to you.
I attache both the modified "unified_odbc.c" and the diff files.
Originally I have downloaded the 3.0.9 version of PHP.
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.
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.
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.
4. To execute SQLBindCol
was sometime (using some ODBC driver) unsuccessful before SQLExecute so
I moved it after SQLExecute.
Please spend some time on my experiences and results and if you find it
useful
include it in the next patch as it is or as you like it.
Please send me back a message if I could help a bit or not.
Thank you very much,
Miklos Krivan
Address:
H-2600 Vac
Nagymezo u. 55. 4/14.
Hungary
E-mail: mkrivan@mail.toig.matav.hu
or krivan.miklos@ln.matav.hu