Android Question insert intodatabase queries data from textebox

angelone

Member
Licensed User
Longtime User
The values that I want to insert into the database queries are entered by user in a textebox . Which is the right syntax to include them ?

For example, ' Jane ' and ' Jones ' are the values that I should have in textbox


'insert data and the image to the database
SQL1.ExecNonQuery2("INSERT INTO Persons VALUES( NULL, 'Jane', 'Jones' ,?)", Array As Object(Buffer))
 
Something like this i guess (not using much with database on android)
Code:
    SQL1.ExecNonQuery2("INSERT INTO Persons VALUES( NULL, ?, ? ,?)", Array As Object(myedit1.text, myedit2.text, Buffer))
 
Upvote 0
Ok, thank's a lot, it work perfect. If i want also change the Table of the database i have to do in the same way?

SQL1.ExecNonQuery2("INSERT INTO " & myesit3.text & " VALUES( NULL, ?, ? ,?)", ArrayAs Object(myedit1.text, myedit2.text, Buffer))
 
Upvote 0
Back
Top