vb.net handling databases efficiently (shouldn't be that hard)
Posted on 2006-05-01
I have a friend who I am writing a database application for.
The problem is that the application runs fine on my 3.5ghz machine, and even on a 1ghz machine he tested it on, but his laptop is like a p3 500 or something crazy slow like that.
I am specifically having a problem where it seems to fall behind after 2 seperate database calls in the same function.
Any ideas on how to make the program pace itself so that it doesn't run into problems like this?
The other question is this. My application is a bunch of tabs, each tab has a combobox populated from the db, and selecting an item on the combobox populates a listview. Each time I select the tab it updates the combobox. Each time I make a call to the database I open the connection, initialize it, querry it, close connection and trash the object. Is this the best way to do it or should I open the database connection say at the start of the program and close it at the end?