Saturday, June 03, 2006

SQL Connection property reset!

Recently, my team is testing our application to make sure it works fine in multi instances and Terminal Server environment.

Once launch second instance of our application, we hit show stopper errors.

Firstly, we hit error "Invalid call issued while executing a SQLMORERESULTS( ) sequence." Thank you for UT member to give me hint. We set connection "BatchMode" in DBC to True and test the application. Hey, it still happen! After a lot of observations, trial and error we found that our connection property been reset by VFP.

We are using remote view and SQL Passthrough to manipulate SQL Server data. We retrieve current view connection handle and use it in SPT to share connection among both. Don't know how VFP reset connection property. It causes BatchMode reset to False.

OK, we add code to re-assign True to BatchMode after after retrieve remote view connection handle, before pass to SPT. Problem solved! We start to test our data entry form. Key in records, save them in both instance. Ooopss, we hit error "ODBC error : Invalid transaction State" What is this error all about??!?!?!

Yes, both of these error has cause. Connection transaction mode is reset to ZERO. By right, it should be 1 - AutoCommit or 2 - Manual.

We tried to reproduce the bug in test project, but failed! We would report this to FoxTeam once we can reproduce it.

0 Comments:

Post a Comment

<< Home