I want to insert a whole set of values in my table in MySQL (e.g. This works in MySQL Workbench 8.0 but not in my Java Code. I read the JavaDoc about prepared Statements but I didn’t find any clues on inserting values if I don’t know the type a priori. My Java code looks like this: I tried many
Tag: sql-insert
save text file in sqlite android
I want to save text file in sqlite android but it is giving an error android.database.sqlite.SQLiteConstraintException: NOT NULL constraint failed: at line long result = db.insert(TABLE_NAME,null,cv);. The path gives this in log Download/Link_on.txt and the readFile(path) returns [49, 10, 48, 48, 58, 48…… but it is still failing to save the text file in db. Thanks for the help. Answer