Any chance of somebody telling me what I'm doing wrong here.
Brings up the message that the sSQL variable for the following commands is not a string.
However if I switch the sSQL for those two lines with
it works fine.
Obviously I can just create the sql statement in the sqlite command, but I don't see why it doesn't work the other way.
Cheers
Code:
function SaveForm() local iValidity local tValidity local sData local sPath iValidity = 0; tValidity = ListBox.GetSelected("lbxFormValidity"); for index, item in tValidity do iValidity = iValidity + ListBox.GetItemData("lbxFormValidity", index); end sPath = Input.GetText("inFormPath"); sData = Crypto.Base64EncodeToString(sPath); sSQl = "INSERT IGNORE INTO forms VALUES(NULL, '"..Input.GetText("inFormVersion").."', '"..Input.GetText("inFormName").."', '"..iValidity.."', '"..Input.GetText("inFormFileName").."', '"..ComboBox.GetText("cbxFormType").."', '"..ComboBox.GetText("cbxFormFormat").."', '"..Input.GetText("inFormDescription").."' ,'"..sData.."')"; Paragraph.SetText("Paragraph1", sSQL); SQLite.Query(db, sSQL); Error_Check(); end
Code:
Paragraph.SetText("Paragraph1", sSQL); SQLite.Query(db, sSQL);
Code:
"INSERT IGNORE INTO forms VALUES(NULL, '"..Input.GetText("inFormVersion").."', '"..Input.GetText("inFormName").."', '"..iValidity.."', '"..Input.GetText("inFormFileName").."', '"..ComboBox.GetText("cbxFormType").."', '"..ComboBox.GetText("cbxFormFormat").."', '"..Input.GetText("inFormDescription").."' ,'"..sData.."')"
Obviously I can just create the sql statement in the sqlite command, but I don't see why it doesn't work the other way.
Cheers
Comment