if the file is new for opening, then success for delete, in other hand, if the file is old for opening, then failed for delete. example as follow: sqlite3_open("tmp.db", &mpDB); //tmp.db is exist
----- Original Message ----- From: LuYanJun To: sqlite-users sqlite.org Sent: Thursday, November 09, 2006 11:11 AM Subject: Why can't I delete tmp.db after close sqlite? Hi all Why can't I delete tmp.db after close sqlite? sqlite3* mpDB; int nRet = sqlite3_open("tmp.db", &mpDB); if (nRet != SQLITE_OK) { const char* szError = sqlite3_errmsg(mpDB); printf("open error:%s\n",szError); } sqlite3_close(mpDB); printf("close!\n"); if ( ! ::DeleteFile(tmp.db )) { printf("delete error!\n"); } else printf("ok delete!!!\n"); return 0; Best regards