Need big help for big problem 
Author Message
 Need big help for big problem

Hi All,

Ok here is the scoop i wrote an app in vb6 that will take
a file with 1 million lines in it and i need to insert
that file into multiple databases SQL 2000 i got all the
code in place and it's working ALMOST like it should

Problem:
When i run the app it starts doing it's thing but it
freezes until it's done so basicaly if i go to a other
window and come back to the app, i don't see any controls
on the form of the app, it even makes my Progress bar not
to work but of course i can't see anything on the form

after looking at the current running processes i see the
app running at 90-100% cpu, is there any way to limit the
cpu the app is allowed to use

any idea on how i can fix this
Thank you soo much for all the help
John



Tue, 25 Oct 2005 05:46:11 GMT  
 Need big help for big problem

Quote:
> Hi All,

> Ok here is the scoop i wrote an app in vb6 that will take
> a file with 1 million lines in it and i need to insert
> that file into multiple databases SQL 2000 i got all the
> code in place and it's working ALMOST like it should

> Problem:
> When i run the app it starts doing it's thing but it
> freezes until it's done so basicaly if i go to a other
> window and come back to the app, i don't see any controls
> on the form of the app, it even makes my Progress bar not
> to work but of course i can't see anything on the form

Add code to periodically (every 100 iterations (or 500 or 1000 or whatever))
to call DoEvents -or- Me.Refresh -or- call the Sleep API function

Quote:
> after looking at the current running processes i see the
> app running at 90-100% cpu, is there any way to limit the
> cpu the app is allowed to use

adding a call to Sleep will release some CPU time; other than that you'd
probably have to muck with the thread or process priorities.

Declare Sub Sleep Lib "kernel32" (byval millseconds as long)

Sleep 500



Tue, 25 Oct 2005 05:52:45 GMT  
 Need big help for big problem
John,

DoEvents is probably your best option as it will allow users to
minimize/move the window but be careful because they can also click any
button or try to close the form. You need to either disable all controls or
put a check in the event for the control to see if the process is running
and ignore the click.

--
Michael Culley



Tue, 25 Oct 2005 07:21:24 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Re. BIG BIG problem

2. BIG BIG Problem

3. {Need Help Big Project Need Help}

4. ASP, big problem, 3 large scripts, need help

5. BIG PROBLEM with MSFLEX GRID CONTROL - Help Needed

6. Big Versions, Big Words

7. How big is too big?

8. How big is a big vb-exe

9. FORMS: How big is too big??

10. ?VBDOS- Big programs and big QLBs

11. URGENT - VB creates a big big database in Win98

12. BIG BIG TROUBLE ( Package & Deploy)

 

 
Powered by phpBB® Forum Software