Oliver Simith
Member
Hello, everyone, I am new to the SQL library. By studying tutorials, I understand that we could use the "?" mark as a placeholder in some SQL Sentences, and then replace the "?" marks with an array.
I wonder if it is also possible to use "?" in a table creation sentence. In other words, is it possible to use "?"marks" in the following sentence?
And here's the log:
I know it definitely works if I use CREATE sentences in a standard form. I am just curious if there's an alternative way to do it if I want to use "?" marks.
thank you in advance for any comment.
I wonder if it is also possible to use "?" in a table creation sentence. In other words, is it possible to use "?"marks" in the following sentence?
a problematic sentence:
Private fields(3) As String
fields(0)="Name"
fields(1)="Age"
fields(2)="Score"
...
sql.ExecNonQuery2("CREATE TABLE persons(? text, ? integer, ? integer)",fields)' my program boke at this line.
And here's the log:
the log message:
Error occurred on line: 53 (Main)
android.database.sqlite.SQLiteException: near "?": syntax error (code 1 SQLITE_ERROR): , while compiling: CREATE TABLE persons(? text, ? integer, ? integer)
I know it definitely works if I use CREATE sentences in a standard form. I am just curious if there's an alternative way to do it if I want to use "?" marks.
thank you in advance for any comment.