Adding a line terminator at the end of my SQL string.
This line does NOT trigger Error 21:
dim sql as String = "CREATE TABLE " + tableName + "( fld_text1 TEXT, " + EndOfLine + "fld_text2 TEXT);"
This line DOES trigger Error 21:
dim sql as String = "CREATE TABLE " + tableName + "( fld_text1 TEXT, " + EndOfLine + "fld_text2 TEXT);" + EndOfLine
It's that extra "+ EndOfLine" at the end that causes the problem.
I tried all 3 EndOfLine (Mac/CR, Win/CRLF, Unix/LF). Same behavior in all cases -- terminator on the end causes line 21.
Also, Error 21 is documented as "Library used incorrectly" but at runtime the Database.ErrorMessage is actually "Not an error".
No comments:
Post a Comment