SQLite: 2 Problems by working with table
- by TianDong
Hallo all,
I have a SQliteDatabase object db, i want to create a table in db with the following code
db.execSQL("CREATE TABLE IF NOT EXISTS "+ TABLE2_NAME + " (exer_nr INTEGER PRIMARY KEY ,exerText varchar(250),answerA varchar(250),answerB varchar(250),answerC varchar(250),answerD varchar(250))");
An Error occur. Why? Is this too large? How can i fix it?
Another problem:
I want to insert a row into the table, whose "exerText" column contains the following code as part of it's content.
main( )
{ int m=12, n=34;
printf("%d%d", m+ +,+ +n);
printf("%d%d\n",n+ +,+ +m);
}
An Error occur because of the "" and '' symbols in the code. How can i fix this problem ?
Thanks a lot