SQLite Forum

New Column not saving data

New Column not saving data

(1) By Goravani (DasGoravani) on 2020-05-04 23:08:04 [link] [source]

Greetings Forum,

I have an application written in Omnis Studio, the high level RAD language, which uses SQL as its backend, you get to choose which SQL, I chose SQLite.

So far so good... been saving and retrieving data to database Omnis made for me.

But now I need to add a column, so I added it to the database, and in Omnis to it's Schema and File Class for that Database Table. It has to be added in these 3 places, so I did, all align.

I got feedback from the database that indeed the column added correctly..

The datatype I put in, and this relates to Omnis, is "LIST"

Omnis has a whole bunch of data types that SQLite responds to, including picture, date fields, and lists

In the database Omnis created for me I have many lists, and the database feedback on my columns includes that word as a data type in that column that normally says CHAR TEXT REAL etc, it says LIST in those.

So I mimicked what they had already done that was working, and it didn't work.

My data is good all the way up to and through my UPDATE statement, my list is packed, before and after I issue that, and it says it went through no errors

But when I fetch the record fresh to check if my list got saved it is indeed NULL

I can't get this new column to save data.

So I switched to a database backup from before adding the field

And added it again, this time as BLOB

And tried again to save data to it and retrieve it back, and it's NULL

So now I've tried an Omnis recommended data type that matches the Omnis internal data type, and then I tried a SQLite native data type, and both did not work to save and retrieve only this new column, the rest of the data comes in just fine

this new column is not working

I added a column the other day, and it works, but it is numeric and in a different table

this table I'm adding a column to has 379 columns, many of which are picture and list, blobs so far as I know

What could possibly be stopping my new column from working?

(2) By Simon Slavin (slavin) on 2020-05-05 00:05:50 in reply to 1 [source]

this table I'm adding a column to has 379 columns

This statement, all by itself, tells me that your database needs redesigning. But I'll ignore that.

Please download the SQLite command-line tool and try your UPDATE statement in it. This will remove the Omnis datatype confusion from your debugging efforts. You can use SELECT commands in the same tool to see whether your UPDATE command worked.

If the command-line tool fails to work we can help you because it is written by the SQLite team. If it works, your problem is with Omnis and you need help from Omnis people, not us.