SQLite: 2 Problems by working with table
Posted
by TianDong
on Stack Overflow
See other posts from Stack Overflow
or by TianDong
Published on 2010-06-13T12:00:30Z
Indexed on
2010/06/13
12:02 UTC
Read the original article
Hit count: 184
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
© Stack Overflow or respective owner