In vb6 I am using Microsoft.Jet.OLEDB.4.0 to open an existing .mdb file. Before opening it I want to Kill (delete) it so that new data is inserted in it.
When first time it is opened, Kill statement deletes the file and new data appears in Report but when next time Kill is used, it doesn't delete the file (as .ldb file is made this time).
Please help me delete this .mdb file in this case.
It's fairly unusual to delete the entire Database. Are you sure that's what you want to do. I can understand wanting to DROP a Table (ie Remove it completely) and DELETE FROM a Table (removing all rows from a Table)
Before you can Kill this database you have to close the connection the .ldb means its being used.
Keith
I've been programming with VB for 17 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.