S
sippyuconn
I am have a moment where i am having brain freeze ![Smile :-) :-)](/styles/default/custom/smilies/smile.gif)
trying to execute a sql statement that will take awhile but I want to
process the windows messages and force the user to wait for completion. This
code works but the first messagebox doesn't repaint and I get a half painted
window
Would a backgrounder worker be the best option and how to put in so user
needs to wait for completion of sql ???
Thanks
if (MessageBox.Show("Are you sure you want to delete all records ?", "Delete
Records", MessageBoxButtons.OKCancel) == DialogResult.OK)
{
try
{
doCommands();
cmdQuery.DbExecute("DELETE FROM " + myTable);
CloseDB();
MessageBox.Show("Success - deleting records ", "Delete
Records", MessageBoxButtons.OK);
}
catch (Exception ee)
{
Logger.WriteException(ee);
MessageBox.Show("Failure - deleting records ", "Delete
Records", MessageBoxButtons.OK);
}
![Smile :-) :-)](/styles/default/custom/smilies/smile.gif)
trying to execute a sql statement that will take awhile but I want to
process the windows messages and force the user to wait for completion. This
code works but the first messagebox doesn't repaint and I get a half painted
window
Would a backgrounder worker be the best option and how to put in so user
needs to wait for completion of sql ???
Thanks
if (MessageBox.Show("Are you sure you want to delete all records ?", "Delete
Records", MessageBoxButtons.OKCancel) == DialogResult.OK)
{
try
{
doCommands();
cmdQuery.DbExecute("DELETE FROM " + myTable);
CloseDB();
MessageBox.Show("Success - deleting records ", "Delete
Records", MessageBoxButtons.OK);
}
catch (Exception ee)
{
Logger.WriteException(ee);
MessageBox.Show("Failure - deleting records ", "Delete
Records", MessageBoxButtons.OK);
}