back ground worker thread to execute task sequentially

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello.

have application which i submits sql queeries to remote SQL server. i want
to do these from back ground thread. most importantly i wan this back ground
thread to perform the execuiono of the querry in the order i post them. wheni
used new thread for each querry had problems wiht them not executing in the
order i want. can some on help me please?

*******************************************************
DBsql.NonQuery=NonQuery;
DBsql.QParameter=QParameter;

WorkerThread=new Thread(new ThreadStart(DBsql.ExecuteQueryNon));
WorkerThread.Priority=ThreadPriority.BelowNormal;
WorkerThread.Start();
 
I had a similar problem with serial communication. I had to transport and
receive data from 4 different device in sequence.
I tried thread but they lost the order and communication failed because
while device1 process working device2 process was starting.
So i used stg like this

while (communicate)
process1()
process2()
process3()
Application.Doevents()
end while

sub process1()
Application.Doevents()
.......
end sub

etc..
If time of your process is bigger than 1000ms it is useful.
Hope it works

--
Hakan Aktan
Software Developer

"chamal kalamulla" <[email protected]>, haber
iletisinde þunlarý
yazdý:[email protected]...
 
Back
Top