Missing data with revDatabaseColumnNamed [SOLVED]
Posted: Sun Feb 26, 2023 12:17 am
It seems that data of the last column of the last record of a SQLite database isn't being returned when using revDatabaseColumnNamed. I've searched the forums and not seeing anyone else with this issue, so the issue might be related to my code.
I'm using the OpenSource version of LiveCode 9.6.3 build 15543 on macOS
Code: Select all
command UpdateUserFieldControlContent stackLongID
local databaseID
put the cDatabaseID of stackLongID into databaseID
local recordSetID
put the cRecordSetID of stackLongID into recordSetID
local recordSetCount
put DBRecordSetCount(recordSetID) into recordSetCount
local numberOfControls
put the number of controls of stackLongID into numberOfControls
if (recordSetID is a number) then
repeat with i = 1 to numberOfControls
if (char 1 to 3 of the short name of control i <> "dbd") then
if (databaseID <> EMPTY) AND (recordSetID <> EMPTY) AND (the cToolType of control i <> "label") then
put revDatabaseColumnNamed(recordSetID, "dbdID") & LF & \
revDatabaseColumnNamed(recordSetID, "field_id_1039")
set the text of control i to (revDatabaseColumnNamed(recordSetID, the cName of control i)) // where cName is "field_id_1039" and
// shows the correct values for the previous entries
end if
end if
end repeat
end if
end UpdateUserFieldControlContent