| Author |
Message |
bmarinel
Joined: 03 Apr 2003 Posts: 18
|
Posted: Tue Mar 23, 2004 4:38 pm Post subject: Setting the cursor |
|
|
Hi,
I'm setting Screen.Cursor := crSQLWait in the TSQLStoredProc.BeforeOpen event handler. As soon as the stored procedure starts to execute, the cursor returns to the default cursor.
How do I prevent this from happneing? I want my user to know that the procedure is executing, and not just think the application is hung.
Thanks,
Bill |
|
| Back to top |
|
 |
Mat000
Joined: 04 Nov 2003 Posts: 12
|
Posted: Tue Apr 06, 2004 11:59 pm Post subject: |
|
|
Hi there,
it seems slightly strange, I tried to do the same.
There are two event handlers:
| Code: | procedure TfMain.SQLStoredProc1BeforeOpen(DataSet: TDataSet);
begin
Screen.Cursor := crSQLWait;
end;
procedure TfMain.SQLStoredProc1AfterOpen(DataSet: TDataSet);
begin
Screen.Cursor := crDefault;
end; |
When I open the stored proc...
| Code: | | SQLStoredProc1.Open; |
... it really works. I'm using Delphi 7.
But I can't do the same, when the stored proc must be executed. I have to use something like:
| Code: | Screen.Cursor := crSQLWait;
try
SQLStoredProc1.ExecProc;
finally
Screen.Cursor := crDefault;
end; |
|
|
| Back to top |
|
 |
|