|
-
Aug 14th, 2007, 12:48 AM
#1
Thread Starter
Member
[RESOLVED] VB6 Performance
Anybody could help me please...
Most of my queries are long especially when generating reports. Querying is just fine except that my vb application is eating up my cpu (100% usage).
How can i execute query with minimal cpu usage (e.g 50% usage)? Just like other application like WINZIP that i could still extracting zip file, while working with other application without having the problem of system performance...
Maybe cpu usage is not an issue here.
Is it possible with vb6, especially in queries?
I am Using vb6 & mssql 2000...
Please help or any suggestions..
Thanks a lot!
-
Aug 14th, 2007, 01:05 AM
#2
Hyperactive Member
Re: VB6 Performance
are you using Stored procedures in MSSQL Server? Use indexes to your tables for speedup executing of your queries.
If the post is heplful, Please Rate it
Chathura Wijekoon
-
Aug 14th, 2007, 02:00 AM
#3
Re: VB6 Performance
I don't know of any way to control CPU usage of your process. You can change thread priority which can make other apps run smoother along with yours, but other than that I'm not sure.
Windows seems to utilize all CPU available during a loop or other process. For example, if nothing else is requesting CPU cycles Windows will give your program 100%. If you have 2 instances of your program running, you'll notice each will use about 50%.
-
Aug 14th, 2007, 03:11 AM
#4
Thread Starter
Member
Re: VB6 Performance
I don't use stored procedures but I do creating indexes....
I don't have maybe the problem with queries performance coz my longest query took less than a minute. In fact, the query is running very fast but choking my system. What i want now (it could be funny) is to make it slower just like a speed of a browser. Browser is slow isn't it? But i could open many windows as long as my memory could handle...
Is it possible with vb6?
Anyway, thanks for all of you guys!
-
Aug 14th, 2007, 04:28 AM
#5
Re: VB6 Performance
Upgrade CPU to the dual/quad processor versions, unless you intend to write your own mssql dll.
-
Aug 14th, 2007, 04:30 AM
#6
Re: VB6 Performance
Post your code as it could be something that you coded that is adding extra slowness.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 14th, 2007, 05:03 AM
#7
Re: VB6 Performance
create stored procedure in your database that you can call from vb
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Aug 14th, 2007, 06:38 AM
#8
Re: VB6 Performance
Are you sure it is your application? Do you have any potential network issues?
-
Aug 14th, 2007, 11:05 AM
#9
-
Aug 22nd, 2007, 08:37 PM
#10
Thread Starter
Member
Re: VB6 Performance - RESOLVED
Thanks a lot guys.
My problem has been resolved. I can run queries without choking my CPU.
I have found the answer ==> http://support.microsoft.com/kb/262311
Thanks a lot!
-
Aug 22nd, 2007, 08:42 PM
#11
Re: VB6 Performance
Cool Could you please resolve the thread Click Thread Tools --> Mark Thread Resolved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|