I have a SQLite database that has been running successfully for a couple of years. One of the tables has a column named “isActive” which is defined as an integer value.
All of a sudden, any attempt to do an UPDATE of that column fails with an error like no such column: isActive. Yet, I am able to SELECT on that column and get results with no error.
(I also get the same error when I try to EXPLAIN on the UPDATE command.)
SQLite Manager reports that the database integrity is OK, and an older backup of the database does not exhibit the problem.
Any ideas about what might be going on would be MOST welcome…
have you used a database tool (Navicat, SQLManger, etc) to see if those tool(s) have the same issue or if the issue is Xojo related? I am curious where the issue is popping up. Have you switched which version of Xojo you are using for the project/app? updated plugins or controls?
I’ve tested it using SQLabs SQLiteManager 4.3.5, and the problem is present there, without my Xojo app in the loop. Using the same tool and queries shows no problem on the backup db, however.
That is a good sign (I know you dont see it that way). We have rules out Xojo and all its goodness.
Have you tried creating a new SQLite file, and copying all the data into the new file and see if the new file has the same issues? the sqlite file might be corrupt and a new file might fix it. Also, you could try SQLiteDoctor and see if it finds issue with the SQLite file.
Actually, I do see it that way. I was happy that it’s not my app/Xojo. (Of course, it could still be Xojo since Marco builds SQLite Manager wit it, but since the backup from a few days ago is OK, I think Xojo is off the hook…)
Sadly, easier said than done. I first have to download the >3 GB database from our customer network to do that with my Mac. My remote access only permits me to use a Windows machine over which I have very little control. I’ll have to wait until they are more or less done for the day, to do it…
[quote=239409:@Peter Truskier]I have a SQLite database that has been running successfully for a couple of years. One of the tables has a column named “isActive” which is defined as an integer value.
All of a sudden, any attempt to do an UPDATE of that column fails with an error like no such column: isActive. Yet, I am able to SELECT on that column and get results with no error.
.[/quote]
Try what happens when you put the field name between qoutes.
Also what may help if you show us the exact SQL command that triggers the error.