Click here to Skip to main content
15,891,033 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: [Need Correction]Class To Load sqlReader into Listview Pin
fenindom27-May-10 9:27
fenindom27-May-10 9:27 
QuestionProcedure and code for adding a plug-in for Outlook. Pin
S.Srinivasa Rao26-May-10 23:18
S.Srinivasa Rao26-May-10 23:18 
AnswerRe: Procedure and code for adding a plug-in for Outlook. Pin
Dalek Dave26-May-10 23:52
professionalDalek Dave26-May-10 23:52 
AnswerRe: Procedure and code for adding a plug-in for Outlook. Pin
Tom Deketelaere27-May-10 2:37
professionalTom Deketelaere27-May-10 2:37 
AnswerRe: Procedure and code for adding a plug-in for Outlook. Pin
Eddy Vluggen28-May-10 1:56
professionalEddy Vluggen28-May-10 1:56 
GeneralRe: Procedure and code for adding a plug-in for Outlook. Pin
Luc Pattyn28-May-10 2:38
sitebuilderLuc Pattyn28-May-10 2:38 
GeneralRe: Procedure and code for adding a plug-in for Outlook. Pin
Eddy Vluggen28-May-10 5:08
professionalEddy Vluggen28-May-10 5:08 
QuestionWindows Service Comsuming 99% CPU Pin
VikashGohil26-May-10 21:11
VikashGohil26-May-10 21:11 
Hello, this is Vikash Gohil.

I have Created a Windows Service which does the following when service is started :

Connects SQL Server 2000 Database.
Starts a Threads.
Thread executes a while loop
In the while loop,
Current system time is taken using : format(now,"HH:mm")
A Query is made to a Table in Database to look for records as below.
"Select <FieldName> From <tableName> Where <FieldName>='" & format(now,"HH:mm") & "'"
if any record exists, then a particular procedure gets executed.

The above code continues to run in a while loop 24/7

The problem I am facing is, the service takes aroung 98% CPU Usage.
The Database Table contains only 20 to 25 records.

I want to know why this thing is happening.

Is it bcoz of the while loop. If yes, then what to use instead of while loop?

I Can't change the Service functionality as it is a client requirement.

Please can anyone guide me in this matter.

Any help would be greatly appreciated.

Thanks in Advance, awaiting a reply soon.
AnswerRe: Windows Service Comsuming 99% CPU Pin
Estys26-May-10 21:24
Estys26-May-10 21:24 
GeneralRe: Windows Service Comsuming 99% CPU Pin
VikashGohil26-May-10 23:22
VikashGohil26-May-10 23:22 
GeneralRe: Windows Service Comsuming 99% CPU Pin
Dalek Dave26-May-10 23:51
professionalDalek Dave26-May-10 23:51 
GeneralRe: Windows Service Comsuming 99% CPU Pin
VikashGohil27-May-10 0:11
VikashGohil27-May-10 0:11 
GeneralRe: Windows Service Comsuming 99% CPU Pin
Estys27-May-10 1:22
Estys27-May-10 1:22 
AnswerRe: Windows Service Comsuming 99% CPU Pin
Аslam Iqbal11-Jul-10 0:54
professionalАslam Iqbal11-Jul-10 0:54 
QuestionHow can I right-align an image inside a picturebox? Pin
Sonhospa26-May-10 7:28
Sonhospa26-May-10 7:28 
NewsRe: How can I right-align an image inside a picturebox? Pin
Sonhospa26-May-10 8:30
Sonhospa26-May-10 8:30 
GeneralRe: How can I right-align an image inside a picturebox? Pin
Henry Minute26-May-10 11:59
Henry Minute26-May-10 11:59 
GeneralRe: How can I right-align an image inside a picturebox? Pin
Luc Pattyn26-May-10 13:05
sitebuilderLuc Pattyn26-May-10 13:05 
GeneralRe: How can I right-align an image inside a picturebox? Pin
Luc Pattyn26-May-10 13:09
sitebuilderLuc Pattyn26-May-10 13:09 
NewsRe: How can I right-align an image inside a picturebox? Pin
Sonhospa27-May-10 9:54
Sonhospa27-May-10 9:54 
QuestionShow dataset created in own thread in GUI Pin
Johan Hakkesteegt26-May-10 2:58
Johan Hakkesteegt26-May-10 2:58 
AnswerRe: Show dataset created in own thread in GUI Pin
Sonhospa26-May-10 5:53
Sonhospa26-May-10 5:53 
GeneralRe: Show dataset created in own thread in GUI Pin
William Winner26-May-10 13:08
William Winner26-May-10 13:08 
GeneralRe: Show dataset created in own thread in GUI Pin
Johan Hakkesteegt26-May-10 20:56
Johan Hakkesteegt26-May-10 20:56 
QuestionVBA Previous sheet copy Pin
Dalek Dave26-May-10 1:21
professionalDalek Dave26-May-10 1:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.