I am attempting to open an SQLite database on the Mac (OSX Snow Leopard) and am 
getting an error.  This is the code I am using:


   char      DBEnginePath[1000];

   strcpy(DBEnginePath, "Macintosh HD:Applications:Adobe InDesign 
CS5:Plug-Ins:WPC_ID:IndexData.db");
   fprintf(stderr, "%s\n", DBEnginePath);                                       
 //  Sends correct path to stderr for verification.
   Result = sqlite3_open_v2(DBEnginePath, &db_ptr, SQLITE_OPEN_READONLY, NULL); 
 //  Errors out here.

   const char *msg = sqlite3_errmsg(db_ptr);
   fprintf(stderr, "Here's the SQLite error message: %s\n", msg);               
 // Sent to stderr: "Unable to open database file."


I have verified that the file exists on the path described above.  What am I 
doing wrong?

TIA!

R,
John A.M. Darnell
Senior Programmer
Walsworth Publishing Company
Brookfield, MO
John may also be reached at 
johnamdarn...@gmail.com<mailto:johnamdarn...@gmail.com>

Trivia question Trivia question:  In The Lord of the Rings,Leglolas was a 
prince among the Silvan Elves.  What was the name of his father the King?  For 
extra credit, what was his surname?



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to