G
Guest
Hi, I have the following method where I need to display which database is
being processed, however, the label lblDatabase dosn't seem to work until the
end.
private void AddPathAndCallCompactDB(string dbFolder, string systemDB,
string UserID, string Pwd, string dbFileName)
{
FileInfo dbFileInfo = new FileInfo(dbFolder + dbFileName);
this.lblDatabase.Text = dbFileInfo.Name;
if (dbFileInfo.Exists)
{
CompactDB(systemDB, UserID, Pwd, dbFileInfo.FullName);
progressBar.Value++;
}
else
//Cannot find database file
{
MessageBox.Show("Cannot find the database " + dbFileInfo.FullName + "\n" +
"\n" +
"Check the database name (and path, if specified) to make sure it exists." +
"\n" + "\n" +
"The other databases will be compacted.",
messageHeader,MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
}
}
being processed, however, the label lblDatabase dosn't seem to work until the
end.
private void AddPathAndCallCompactDB(string dbFolder, string systemDB,
string UserID, string Pwd, string dbFileName)
{
FileInfo dbFileInfo = new FileInfo(dbFolder + dbFileName);
this.lblDatabase.Text = dbFileInfo.Name;
if (dbFileInfo.Exists)
{
CompactDB(systemDB, UserID, Pwd, dbFileInfo.FullName);
progressBar.Value++;
}
else
//Cannot find database file
{
MessageBox.Show("Cannot find the database " + dbFileInfo.FullName + "\n" +
"\n" +
"Check the database name (and path, if specified) to make sure it exists." +
"\n" + "\n" +
"The other databases will be compacted.",
messageHeader,MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
}
}