Take the tour ×

Could a busy hStmt and invalid cursor errors be caused by faulty data?

ODBC and the software that connects to the database is correct and working - i have ran a test with a clean database (that has no user data in it yet and it worked). I have also used scripts to move data from the old database to the working one. Errors then appear in the new database.

I'm unable to locate any problem with the database itself - the tables are all there, procedures work, primary keys, options match.

I've even rebuilt several non critical tables.

However, since it is an interconnected database, simple copy-and-paste to the new database can easily result in some unwanted ID/serial mismatch and render the new database useless.

I've noticed this behavior: ID numbers seems to skip. For instance, it jumped from 11 to 247 - and that table requires specific user input and over 200 "unfinished" queries to it etc - this doesn't seem to be reasonable.

The hStmt error seems to generally happen when a specific value is being selected by the server software, rendering the following steps useless.

Could it be caused by corrupted data? When it selects, its just 1 short integer.

share|improve this question
Still the same problem as this? dba.stackexchange.com/questions/23009/… If so, why not just edit that question? –  FreshGrinchOfSO Aug 30 '12 at 11:49
for this one it was the tblguild issue, now its related to a tbl general with focused on the hsmt error. The previous one, for a unknown reason vanished by itself. –  Agony Aug 30 '12 at 11:57
Does this apply at all? support.microsoft.com/kb/143032 - are you using an rdoConnection? –  Max Vernon Aug 30 '12 at 13:40
When you say this is not a software issue, what leads to believe that? Have you tested your code on thousands of sets of data, and only this single time an issue occurs? If so, you should be able to deduce which dataset is causing the error and resolve the issue yourself very easily. I would lean towards this being a coding issue with your software long before suspecting corruption as the cause. –  Max Vernon Aug 30 '12 at 13:48
its over odbc. The software problem was eliminated by testing it with original database, also by using clean copy of the software and it runs fine for others who use the same file. It is over sql server driver (the native isn't fully supported by the developer). Its something that has worked fine for years, yet just suddenly failed. The database itself has not been changed and server software ether uses procedures or queries to read/write/select data, but makes no changes to the tables or creates them. –  Agony Aug 30 '12 at 20:07
add comment


Your Answer



Browse other questions tagged or ask your own question.