PDO closeCursor Error

Posted by Metropolis on Stack Overflow See other posts from Stack Overflow or by Metropolis
Published on 2010-05-28T15:50:23Z Indexed on 2010/05/28 15:51 UTC
Read the original article Hit count: 224

Filed under:
|
|
|

Hey Everyone,

I currently have a database layer that I wrote myself and I have been using it now for over a year without any problems. The database class uses PDO, and there are two different databases that I regularly connect to (MySQL and MS SQL). The MS SQL database is used for Accpac accounting storage, and the MySQL database is used for everything else.

In one of the MySQL databases I have all of the dsn's listed which I use to create the string I need to connect to the MS SQL databases.

I have a new program I am trying to write which I am taking employee data from one of the MySQL databases, and using the employee ID to get the employee's information from the MS SQL database. For some reason, whenever I run the program it will get through about 1200 records (out of 11k) and then crash with an error like the following,

 Fatal error: Call to a member function closeCursor() on a non-object

I have tried moving the loops around in many different ways, and I have tried manually closing the connections by setting the database handle to null. Nothing I do seems to work.

Thanks for any help!

Metropolis

© Stack Overflow or respective owner

Related posts about php

Related posts about sql