Dumb ass database question!
Posted: Sun Apr 26, 2009 10:54 am
Hi,
I was just testing what happens with PB's database commands when accessing a remote database (MySQL in this case) and the connection fails in the middle of retrieving the results of a Select query.
I opened the connection and issued the select query. Before using NextDatabaseRow() I slapped a message requester in to halt proceedings and then yanked my modem from the back of my machine - thereby destroying the connection.
I was mildly surprised to find that all records were still retrieved!
Obviously the DBMS has sent the results of the select query to my client 'up front' - or at the very least it sent a bunch of records via some kind of caching. The database in question is very small and so I cannot be sure if the DBMS is in the habit of sending the entire recordset or just the first x records etc?
Anyone know for sure what is happening here and whether this is the same for all remote DBMS accessed via ODBC ? I mean is there some requirement imposed by ODBC that all records are sent up front or just a few records etc? Do some ODBC drivers immediately create a separate thread, for example, to retrieve a set number of records to be cached?
Thanks.
I was just testing what happens with PB's database commands when accessing a remote database (MySQL in this case) and the connection fails in the middle of retrieving the results of a Select query.
I opened the connection and issued the select query. Before using NextDatabaseRow() I slapped a message requester in to halt proceedings and then yanked my modem from the back of my machine - thereby destroying the connection.
I was mildly surprised to find that all records were still retrieved!
Obviously the DBMS has sent the results of the select query to my client 'up front' - or at the very least it sent a bunch of records via some kind of caching. The database in question is very small and so I cannot be sure if the DBMS is in the habit of sending the entire recordset or just the first x records etc?
Anyone know for sure what is happening here and whether this is the same for all remote DBMS accessed via ODBC ? I mean is there some requirement imposed by ODBC that all records are sent up front or just a few records etc? Do some ODBC drivers immediately create a separate thread, for example, to retrieve a set number of records to be cached?
Thanks.