Click here to Skip to main content
15,908,675 members
Home / Discussions / Database
   

Database

 
GeneralRe: Could use an extra brain... Pin
Steven Campbell2-Jul-04 11:15
Steven Campbell2-Jul-04 11:15 
GeneralRe: Could use an extra brain... Pin
brdavid2-Jul-04 14:53
brdavid2-Jul-04 14:53 
GeneralSQL query required Pin
Imtiaz Murtaza1-Jul-04 23:02
Imtiaz Murtaza1-Jul-04 23:02 
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 
Hello,

I've been banging my head on the wall trying to figure this out.

I'm very new to Visual Studio (as you may be able to tell..)

I have a very simple C# program that calls a stored procedure on a sql server. The SP takes a bit of time, so I just wanted to do something to show that the user has actually hit the button and the system is busy processing.

I found a couple of excellent examples of what I could do here on the code project, but the problem is that no matter what I do, the system won't paint it on the screen until after the SP returns. (kind of defeating the purpose)

For simplicity, and to reduce the problem as far as possible, I even use a dummy SP that simply goes:

WAITFOR DELAY '00:00:10'<br />
select * from My_Table where Last_Name = 'Smith'


The select is just so that it'll return something, and I know it worked.

My C# program as I say is dead simple. I use sqlDataAdapter and Fill to fill my dataset.

Again to make things simple, I just put a label on my form with the text "Working.." in it and set it's visible property to false. When the user hits the run button, I set it to true and then do the Fill... but it doesn't display until after the SP returns, 10 seconds later, with the data. I just go:

label1.Visible = true;<br />
sqlDataAdapter1.Fill(dataSet11);


I found that I can at least set the cursor to hourglass.. but that seems inadequate (if the user slips the cursor off the window, it's no longer hourglass) as well as it seems like I should be able to do what I'm trying to do.

So.. well.. Any help or suggestions would be very much appreciated!

Thank you.

- Andrew
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 
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 

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.