Click here to Skip to main content
15,921,941 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL query required Pin
wgdesigner2-Jul-04 22:23
wgdesigner2-Jul-04 22:23 
GeneralRe: SQL query required Pin
Go2Canada5-Jul-04 3:07
sussGo2Canada5-Jul-04 3:07 
GeneralRe: SQL query required Pin
irshu8-Jul-04 21:09
irshu8-Jul-04 21:09 
GeneralA Querying to Date Problm Pin
Anonymous1-Jul-04 20:50
Anonymous1-Jul-04 20:50 
GeneralPlease help - can't update screen while waiting for SP in C#. Pin
unRheal1-Jul-04 12:40
unRheal1-Jul-04 12:40 
GeneralRe: Please help - can't update screen while waiting for SP in C#. Pin
Colin Angus Mackay2-Jul-04 15:34
Colin Angus Mackay2-Jul-04 15:34 
GeneralRe: Please help - can't update screen while waiting for SP in C#. Pin
unRheal2-Jul-04 16:39
unRheal2-Jul-04 16:39 
GeneralRe: Please help - can't update screen while waiting for SP in C#. Pin
Mike Dimmick4-Jul-04 6:52
Mike Dimmick4-Jul-04 6:52 
Aargh. Reentrancy is not a fun thing. Steer well clear of DoEvents - IMO, it's dangerous.

The OP should be using a function called by a worker thread to perform the SQL query, then use Control.Invoke to get back on to the UI thread to update the UI. You can use the thread pool in .NET by calling ThreadPool.QueueUserWorkItem, passing in a WaitCallback delegate.

I don't think what you say about events is true in .NET. It was in VB6, IIRC, but events are called directly in .NET. What the poster is seeing is simply that the thread isn't processing the Windows message queue (since it's blocked doing the stored procedure call) and so isn't getting the WM_PAINT message to repaint itself. If the user brings up a window that covers the UI and then brings this app up again, whole areas won't be redrawn on some operating systems (XP caches some current displays, but IIRC not invalid areas).

Leave the UI thread solely for user interaction - do all processing on another thread, unless you're sure that it cannot possibly take less than about 0.3 seconds. More than that is noticeable delay.

If you do need to update a control synchronously, call Update.

Stability. What an interesting concept. -- Chris Maunder
GeneralRe: Please help - can't update screen while waiting for SP in C#. Pin
Colin Angus Mackay4-Jul-04 7:16
Colin Angus Mackay4-Jul-04 7:16 
GeneralRe: Please help - can't update screen while waiting for SP in C#. Pin
unRheal4-Jul-04 13:42
unRheal4-Jul-04 13:42 
GeneralDTS Package Pin
Member 11509011-Jul-04 2:41
Member 11509011-Jul-04 2:41 
GeneralMaster in SQL please Help Pin
irshu1-Jul-04 1:05
irshu1-Jul-04 1:05 
GeneralRe: Master in SQL please Help Pin
Xiangyang Liu 刘向阳1-Jul-04 1:12
Xiangyang Liu 刘向阳1-Jul-04 1:12 
GeneralRe: Master in SQL please Help Pin
irshu1-Jul-04 18:53
irshu1-Jul-04 18:53 
GeneralRe: Master in SQL please Help Pin
Xiangyang Liu 刘向阳2-Jul-04 3:59
Xiangyang Liu 刘向阳2-Jul-04 3:59 
GeneralRe: Master in SQL please Help Pin
Xiangyang Liu 刘向阳2-Jul-04 4:03
Xiangyang Liu 刘向阳2-Jul-04 4:03 
GeneralRe: Master in SQL please Help Pin
Anonymous4-Jul-04 20:05
Anonymous4-Jul-04 20:05 
GeneralRe: Master in SQL please Help Pin
irshu4-Jul-04 20:06
irshu4-Jul-04 20:06 
GeneralThank you, Pin
irshu4-Jul-04 20:06
irshu4-Jul-04 20:06 
GeneralMS SQL Server date format Pin
spn30-Jun-04 20:26
spn30-Jun-04 20:26 
GeneralRe: MS SQL Server date format Pin
michanne4-Jul-04 17:48
michanne4-Jul-04 17:48 
GeneralRe: MS SQL Server date format Pin
spn6-Jul-04 19:51
spn6-Jul-04 19:51 
GeneralACCESS DB to SQL Pin
youssef30-Jun-04 12:02
youssef30-Jun-04 12:02 
GeneralRe: ACCESS DB to SQL Pin
Colin Angus Mackay30-Jun-04 14:04
Colin Angus Mackay30-Jun-04 14:04 
GeneralRe: ACCESS DB to SQL Pin
youssef30-Jun-04 21:51
youssef30-Jun-04 21:51 

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.