I want to program a MFC application which compacts
MS Access databases.
for this I use the following function:
void CCompactDlg::OnCompactButton()
{
UpdateData(true);
CString parameter ("/user administrator /pwd "
parameter += m_passwort;
parameter += " /compact";
ShellExecute(NULL,NULL, LPCTSTR(m_dbname) ,LPCTSTR(parameter),"",SW_SHOWNORMAL);
}
normally, when you open a MS Access database with the argument "/compact" from command line, the database is opened for a short time and will automaticly closed after comprimission
but when I click on the CompactButton in my application,
the database opens and stays open
what´s wrong?
can anybody help?
(sorry for that english)
MS Access databases.
for this I use the following function:
void CCompactDlg::OnCompactButton()
{
UpdateData(true);
CString parameter ("/user administrator /pwd "
parameter += m_passwort;
parameter += " /compact";
ShellExecute(NULL,NULL, LPCTSTR(m_dbname) ,LPCTSTR(parameter),"",SW_SHOWNORMAL);
}
normally, when you open a MS Access database with the argument "/compact" from command line, the database is opened for a short time and will automaticly closed after comprimission
but when I click on the CompactButton in my application,
the database opens and stays open
what´s wrong?
can anybody help?
(sorry for that english)