Sorry everyone, I just found out that it created the whole path as well as the file. I didn't expect it to create the director(s). Problem soved.
Mel Stober -----Original Message----- From: Stober, Mel [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 12:00 PM To: [EMAIL PROTECTED] Subject: [sqlite] sqlite3_open always returns SQLITE_OK WinCE port with eVC++ 3.0 for PocketPC 2002. sqlite3_open() always returns SQLITE_OK even if I pass an invalid path to the desired database (I pass the full path). The file naturally doesn't get created. Is there a work-around for this problem? Here is my MFC code. m_db is a class member of type sqlite3. In the code snipped below, the path is intentially misspelled to force an error. void CTestAppView::OnExecuteButton() { const char* errmsg = NULL; int errcode; if(m_db == NULL) { errcode = sqlite3_open("\\Storate Card\\MyDatabase",&m_db); if(errcode != SQLITE_OK) { CString s = sqlite3_errmsg(m_db); AfxMessageBox(s); return; } } } Mel Stober