Solved

vb6 app still very slow

Posted on 2013-01-11
6
911 Views
Last Modified: 2013-01-11
Still trying to figure out why my vb6 app takes so much longer to process data on a remote server than a corresponding classic asp web page...

How often should I open a data connection with a connection string?  Currently I open it once as the page processes on my classic asp page but I open and close it every time I access data on my vb6 app.  Should I just open it and leave it open on the vb6 app?
0
Comment
Question by:Bob Schneider
  • 3
  • 2
6 Comments
 
LVL 45

Assisted Solution

by:Martin Liss
Martin Liss earned 334 total points
Comment Utility
Should I just open it and leave it open on the vb6 app?
Sure, why not? Leave it open as long as you need it.
0
 

Author Comment

by:Bob Schneider
Comment Utility
Ok so then do I declare the variable as a public variable in the main module?
0
 
LVL 26

Assisted Solution

by:Chris Luttrell
Chris Luttrell earned 166 total points
Comment Utility
I am a database guy, not much .Net coding anymore, but you should be using some kind of framework that allows connection pooling and opens, shares and closes your connections as needed.  It is true that opening and closing the connection for every database is expensive, so a pool that is opened once or as needed that shares them is desirable.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 45

Accepted Solution

by:
Martin Liss earned 334 total points
Comment Utility
Ok so then do I declare the variable as a public variable in the main module?
Yes.
0
 

Author Closing Comment

by:Bob Schneider
Comment Utility
That was the problem.  Running well now!
0
 
LVL 45

Expert Comment

by:Martin Liss
Comment Utility
I'm glad I was able to help.

Select the 'About Me' tab in my profile and you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2012
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now