Ticket #837 (defect)
Opened 3 months ago
Last modified 2 months ago
TDbConnection::getActive() returns false information
Status: new
| Reported by: | jake | Assigned to: | xue |
|---|---|---|---|
| Priority: | low | Milestone: | 3.1.3 |
| Component: | Prado Framework v3 | Version: | 3.1 |
| Severity: | minor | Keywords: | |
| Cc: |
When using getActive() from TDbConnection it just returns back whatever is the value of the $active variable from the class. The problem with this is that if my database disconnects from my script then the $active variable in the script never gets updated so if I use getActive() then my script will falsely think its still active. Instead I think getActive() should always check the status of the database connection to always have accurate results.
Change History
04/24/2008 03:00:33 AM: Modified by tof06
- milestone set to 3.1.3.

We could check the getConnectionStatus() within getActive() but I am inclined to say that getActive() was ment to check whether the object (TDbConnection) is active, not the physical database connection.
BTW, except for crashing and DBMS server shutdown, when does a DBMS actively disconnect from a client that has a connection to it?
This is more like a design considration and not a bug :)