PEAR MDB2 works with MySQL, not with MSSQL

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Apologies if this is not the right forum.

I have an application written originally to work with MySQL which now
has to be extended to work with MSSQL also. I have modified all my
database calls to use the PEAR MDB2 methods rather than mysqli.
Everything still works fine with MySQL, but I have an odd problem when I
test against MSSQL.

Any database query which does not return a resultset is OK e.g. an
update works fine. If I execute a query returning a resultset it always
comes back empty. var_dump shows that the returned object is of the
right type for the db driver being used, but the result sub-object at
the end is very different; for mssql it shows as a mysqli_result object,
but for mssql shows as a "resource(11) of type (Unknown)".

Any hints and tips gratefully accepted.

PHP 5.1.6, MDB2 2.3.0, MDB2 driver 1.1.2, MySQL 5.0.27
MS SQL Server 2000 installed with client tools on PHP machine


-- Jim.

Site Timeline