I'm trying to insert data from an edittext filed into a sqlite database. I defined and created a database called meds with one table called meds. the table has two cols both text. If I insert data strings in quotes it works but if I try a variable it fails. Below is my code. The error message I am getting says
No such column: EditText.Text: Insert into meds values(editText.text, 'aasdf')
Here is my code, any help is appreciated.
***************************************
Dim EditText1 As EditText
Dim SQL1 As SQL
SQL1.Initialize(File.DirInternal, "med.db", True)
SQL1.ExecNonQuery("DROP TABLE IF EXISTS meds")
SQL1.ExecNonQuery("CREATE TABLE meds (col1 TEXT , col2 TEXT)")
SQL1.ExecNonQuery("INSERT INTO meds VALUES(EditText1.Text, 'aasdf')")
No such column: EditText.Text: Insert into meds values(editText.text, 'aasdf')
Here is my code, any help is appreciated.
***************************************
Dim EditText1 As EditText
Dim SQL1 As SQL
SQL1.Initialize(File.DirInternal, "med.db", True)
SQL1.ExecNonQuery("DROP TABLE IF EXISTS meds")
SQL1.ExecNonQuery("CREATE TABLE meds (col1 TEXT , col2 TEXT)")
SQL1.ExecNonQuery("INSERT INTO meds VALUES(EditText1.Text, 'aasdf')")