H
hui mc via .NET 247
Hi All,
I have a problem after created the access database
the following is my code
private void CreateDatabase()
{
File.Delete(ExportFileDest);
ADOX.Catalog cat = new ADOX.CatalogClass();
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\DailyAttendance.mdb;" +
"Jet OLEDB:EngineType=5");
cat = null;
}
it is fine for first time to create the database but fail if execute twice when the code try to delete
the existing file.
the access file is lock after the first creation. it only release until i closed the application program.
i don't understand why "cat = null;" cannot release the file.
is anyone can help me on this problem? thanks a lot.
From: hui mc
I have a problem after created the access database
the following is my code
private void CreateDatabase()
{
File.Delete(ExportFileDest);
ADOX.Catalog cat = new ADOX.CatalogClass();
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\DailyAttendance.mdb;" +
"Jet OLEDB:EngineType=5");
cat = null;
}
it is fine for first time to create the database but fail if execute twice when the code try to delete
the existing file.
the access file is lock after the first creation. it only release until i closed the application program.
i don't understand why "cat = null;" cannot release the file.
is anyone can help me on this problem? thanks a lot.
From: hui mc