sqlite insert hell

15 views
Skip to first unread message

stefano cerbioni

unread,
Feb 20, 2024, 5:57:04 PMFeb 20
to The Ring Programming Language
hi i try to insert in db sqlite a  simply data  that a grab by  text input box  the  problem i find  but not  find  a solution  in practical  i must add  this    '   because with this  work in sqlitebrowser 

i try to add  in this mode  
func Inserisci() {
if lineedit1ApiKey.text() != "" and lineedit6SecretKey.text() != "" and lineedit8EXchange.text() != ""

oSQLite = sqlite_init()
sqlite_open(oSQLite,"mytest.db")
sql = "
        INSERT INTO key_exchange (ApiKey,SecreatKey,idApi,exchange)
        VALUES  ('lineedit1ApiKey.text()',  'lineedit6SecretKey.text()' ,'lineedit8EXchange.text()',' lineedit7IDApi.text()');"
        ?sql

sqlite_execute(oSQLite,sql)


else
MsgInfo("Info","Devi inserire Apikey,SecreteKey, exchange obbligatoriamente  ")

ok
}
return me  this  code   INSERT INTO key_exchange (ApiKey,SecreatKey,idApi,exchange)
        VALUES  ('lineedit1ApiKey.text()',  'lineedit6SecretKey.text()' ,'lineedit8EXchange.text()',' lineedit7IDApi.text()');   
1. why  not  return a value  'lineedit6SecretKey.text()  read ?
2. why also in this mode  also if  have  '''''''''   not  insert nothing  ?? 
thanks 

Ilir Liburn

unread,
Feb 20, 2024, 6:05:27 PMFeb 20
to The Ring Programming Language
Hello Stefano,

concatenate returned strings from the Ring functions, SQLite knows nothing about .text() existing in the Ring world.

Greetings,
Ilir
Reply all
Reply to author
Forward
0 new messages