http://forums.livecode.com/viewtopic.ph ... tem#p82865
that discusses this issue. A comment states
I have a database in a datagrid table that has around 2000 records and 25 columns. It is getting a bit slow, so I wanted to write it to an SQLite database and work hereafter from the database.I don't have any code that relies on the current weird situation, and I don't have a notion of who might have code that does.
Most of the records have the last column value as empty (in fact, many of the later columns are empty). This prevents me from writing to a database using INSERT command.
For example,
put the dgText[true] of group "Master Table" into tList
set itemDel to tab
put line 1 of tList into tCols
put the number of items in tCols -- returns 25, the number of columns
put line 2 of tList into tRecord
put the number of items in tRecord -- returns 24 (if the last col value is an empty string)
So I am unable to construct an SQLite INSERT query easily (the numbers have to match).
(Yes, I can get around by figuring out if the total number of values is less than the column number, etc., but I was looking for a simpler solution).
mwieder mentions
What would this script look like?And I forgot to mention that there's another way out as well: a global session property that can be set from a script, something like
set the ignoreEmptyLastItem to false
where the default value is true for existing behavior
Thanks,
Sri.