Solved

vb6 app still very slow

Posted on 2013-01-11
6
919 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 46

Assisted Solution

by:Martin Liss
Martin Liss earned 334 total points
ID: 38769153
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
ID: 38769157
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
ID: 38769160
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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 46

Accepted Solution

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

Author Closing Comment

by:Bob Schneider
ID: 38769194
That was the problem.  Running well now!
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 38769246
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

808 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