Solved

Some serious help with programming (and multitasking?)

Posted on 1998-11-04
6
180 Views
Last Modified: 2010-04-30
I have been writing programs for the company that I
work for, for about 6 or 7 months.  Most all of the
programs are used to manipulate databases (mainly
SQL server).  My question is...
When I am running a program, it completely locks
me out of it until it is done.  I can't move the
window, I can't stop it, etc.  How can I program
so that I get that kind of functionality?  Is
there some trick to it?

PLEASE help!
0
Comment
Question by:netwebsales
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 300 total points
ID: 1443169
Sprinkle DOEVENTS in your loops to give other tasks a time slice...

0
 

Author Comment

by:netwebsales
ID: 1443170
So that's all it take, huh?
It looks like you just probably made yourself 300 points
real easy ;-)
Let me try that out before i go ahead and send them over
though.

Thanks!
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1443171
Whenever you have a *REALLY TIGHT* loop, the VB will consume all resources. Tossing in the occassional DOEVENTS will give the rest of the system some time to execute.

You also have to do this with certain controls (the internet control comes to mind). Since the internet control is serviced by the OS if you have a tight polling loop on the control status you'll never give the OS a chance to run the control and you'll wait forever!

M

0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Comment

by:netwebsales
ID: 1443172
So that's all it take, huh?
It looks like you just probably made yourself 300 points
real easy ;-)
Let me try that out before i go ahead and send them over
though.

Thanks!
0
 

Author Comment

by:netwebsales
ID: 1443173
thanks for the help!
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1443174
Thanks for the points!

M
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month5 days, 1 hour left to enroll

636 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