1. Windows 7 Ultimate 64-bit 2. Here is the path I am using: void Database::openSave(bool* bErrors) { if (sqlite3_open("*scSave.sqlite*",&dBase) != SQLITE_OK) { *bErrors = true; createBInfo(); d.createBReport("SQL Code 1",sqlite3_errmsg(dBase),bLocale + to_string(__LINE__),bTDate,"./SC_Log.txt"); }
else { *bErrors = false; } } 3. I checked that earlier today as well as the permission on the database itself. Everything checks out. 4. Here you inspired me to do some extra digging. I added some couts to the player data transaction block in the event that error is not null and I got an error of "Database is Locked". This was surprising because I have no programs open that have my save database open and the only other call to the database before the transaction block starts is the openSave function listed above. On Fri, Feb 21, 2014 at 3:06 PM, Kees Nuyt <k.n...@zonnet.nl> wrote: > On Fri, 21 Feb 2014 14:15:10 -0700, Geo Wil <geowi...@gmail.com> > wrote: > > >Hello, > > > >Yesterday, while working on my game, I noticed that my game data was not > >updating in my save SQLite3 database. So I started tracking down what was > >going on and eventually my search lead me to my dData function. > > > >How this function works is that you pass a table name and a bool, the bool > >is just there in case errors happen to notify the player. I did > exhaustive > >tests yesterday on this block of code and found that it was not > functioning > >properly, it was not deleting the data from my tables. > > > >I checked to see if sqlite3_step was producing an error but it was sending > >back a value of 101 or SQLITE_DONE but the table data remained unchanged. > >I also commented out the code I use to replace the deleted data just to > >make sure the data retrieval code was not at fault. With just the dData > >call and nothing else the data still would not delete from the table. > > > >Here is the code I am using for my dData function: > > > >void Database::dData(string table, bool* bErrors) > >{ > > sqlStr2 = "Delete From " + table; > > > > sqlite3_exec(dBase,"BEGIN TRANSACTION",NULL,NULL,&error); > > > > if (sqlite3_prepare_v2(dBase, sqlStr2.c_str(), sqlStr2.size(), > >&statement2, 0) == SQLITE_OK) > > { > > sqlite3_step(statement2); > > *bErrors = false; > > > > finalize(statement2, bErrors); > > } > > > > else > > { > > *bErrors = true; > > createBInfo(); > > d.createBReport("SQL Code 3",sqlite3_errmsg(dBase),bLocale + > >to_string(__LINE__),bTDate,"./SC_Log.txt"); > > } > > > > sqlite3_exec(dBase,"END TRANSACTION",NULL,NULL,&error); > >} > > > >I am also going to link to my save database in case it itself is to blame > >although I tested this on several different files with the same results. > > > >http://sc.lmpgames.com/scSave.sqlite > > > >I already have posted about this on StackOverflow and so far everyone that > >has attempted to figure this out has been stumped. I am using Microsoft > >Visual Studio 2012 and C++. > > Which version of MS Windows? > What is the path to the database file? > Is the database perhaps stored in a "protected" directory? > Any errors on execution of the BEGIN and COMMIT statements? > > -- > Groet, Cordialement, Pozdrawiam, Regards, > > Kees Nuyt > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- "I though what I'd do was, I'd pretend I was one of those Deaf-Mutes...Or should I?" -- Laughing Man ______________________________ Laughing Man Productions² Entertainment and Gaming Network<http://www.lmpgames.com> _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users