PalaniappaBabu
Programmer
I am trying to compact a MS-Access database using the follwing piece of code which is in Visual C++/JRO :
try
{
CoInitialize(NULL);
IJetEnginePtr jet(__uuidof(JetEngine));
jet->CompactDatabase("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=nSamp.mdb","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=nSampAc.mdb;Jet OLEDB:Engine Type=4"
CoUninitialize();
}
catch(_com_error &e)
{
::MessageBox(NULL, (LPCTSTR)e.Description( ), "", MB_OK) ;
}
The two database are created using MS-Access 2000. but i am getting the following exception :
"Cannot perform this operation; feature in this version are not available in database with older formats."
Can anybody help me??
try
{
CoInitialize(NULL);
IJetEnginePtr jet(__uuidof(JetEngine));
jet->CompactDatabase("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=nSamp.mdb","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=nSampAc.mdb;Jet OLEDB:Engine Type=4"
CoUninitialize();
}
catch(_com_error &e)
{
::MessageBox(NULL, (LPCTSTR)e.Description( ), "", MB_OK) ;
}
The two database are created using MS-Access 2000. but i am getting the following exception :
"Cannot perform this operation; feature in this version are not available in database with older formats."
Can anybody help me??