SQL ExecNonQuery("INERT INTO table..

tcgoh

Active Member
Licensed User
Longtime User
Hi,


I have a edittext.text value that I wanted to insert into a SQL table, but I am unable to get the code right, what is wrong?

SQL1.ExecNonQuery("INSERT INTO CREW VALUES(' " & edittext.text & " ', 'b', 'c', 'd', 'e')")

Thanks
 

tcgoh

Active Member
Licensed User
Longtime User
Try this:
B4X:
SQL1.ExecNonQuery2("INSERT INTO CREW VALUES (?,?,?,?,?)", Array As String(EditText.Text, "b", "c", "d", "e")

Thanks, that worked. BTW what the diff between Array as String & Array as Object?

Sorry I'm Noob and no proper training in programing.
 
Upvote 0

merlin2049er

Well-Known Member
Licensed User
Longtime User
Thanks, took a while before I realized that I should have been using
SQL1.ExecNonQuery2 instead of SQL1.ExecNonQuery1
 
Upvote 0
Top