I am writing a vb6 application to take in SMS text messages from a modem, do some string maniplation on the messages and store them in a MySQL database. It also prints them to the main screen of the application.

I am using a timer to check the SIM card for new text messages. If it finds new messages it sorts them into a database and prints them in a listbox on the main screen, then it deletes that message from the SIM card. That is the general runnung of the application

My question is, why does it cause my application to hang after a certain length of time. I have to do a lot of calls to the mysql database for checking strings against fields int the database and inserting and deleting records from the db. My suspicions are that these multiple calls to the db could be a factor for hanging the app.

Also The machine only has 64MB of RAM, a Pentium 4 Processor and is running WinXP.

If anyone has any ideas of why it might be hanging I would appreciate your support

Do you keep your connection to the database open for long periods of time? Unfortunatly, ado has the tendency to drop connections that are held open for long periods of time and if it is really ado's fault or the network or the server itself who knows. It is just a behavior I have noticed. The cure to this is to close all connections when not in use and reopen them when needed.

Good Luck

I'll second what vb5prgmr has said about only having connections open when they are needed.

Also, have you monitored to see how much free RAM your PC has remaining when it approaches the time where it hangs?
The reason I ask is that 64Mb of RAM with WinXP and a SQL Server database running on it (especially a server with a lot of calls to it) is going to cause slowdowns.

This article has been dead for over six months. Start a new discussion instead.