B4J Question SQL Video sample program issue

OliverA

Expert
Licensed User
Longtime User
Looks like there is an issue in the sample program included in the SQL video. These lines (34&36):
B4X:
Dim id As String = "k'm"

Dim rs As ResultSet = sql.ExecQuery2("SELECT name, birth, image FROM students WHERE id = " & id, Array As String(10))
Lead to this
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (unrecognized token: "'m")
Line 36 is actually causing the error, but it's caused by the value set in line 34. Not sure what was supposed to happen here.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…