Hello , i would like to thank you for this great library , i'm using it in my project but i'm facing an issue while trying to save data ,
basically when i try to save the data it throws an error , i tried to fix it but found nothing to fix , if you can help , i'd appreciate it , thank you
E/SQLiteLog: (21) API called with NULL prepared statement
(21) misuse at line 78396 of [0c55d17973]
D/TAG: Exception not an error (code 0 SQLITE_OK)
val easyDB = EasyDB.init(this,"ITEMS_DB")
.setTableName("CART_TABLE")
.addColumn(Column("item_id", *arrayOf("text","unique")))
.addColumn(Column("item_title", *arrayOf("text","not null")))
.addColumn(Column("item_category", *arrayOf("text","not null")))
.addColumn(Column("item_price_each", *arrayOf("text","not null")))
.addColumn(Column("item_price", *arrayOf("text","not null")))
.addColumn(Column("item_quantity", *arrayOf("text","not null")))
.addColumn(Column("product_delivery_fee", *arrayOf("text", "not null")))
.addColumn(Column("country", *arrayOf("text", "not null")))
.addColumn(Column("city", *arrayOf("text", "not null")))
.addColumn(Column("address", *arrayOf("text", "not null")))
.addColumn(Column("state", *arrayOf("text", "not null")))
val isAdded = easyDB
.addData("item_id",1)
.addData("item_title",model.productName)
.addData("item_category",model.productCategory)
.addData("item_price_each",model.productPrice)
.addData("item_price",totalPrice.toString())
.addData("item_quantity",itemIndex.toString())
.addData("product_delivery_fee",model.productDeliveryFee)
.addData("country",country)
.addData("city",city)
.addData("address",address)
.addData("state",state)
.doneDataAdding()
- I have also tried to seek help on SO , if you would like to take a look
https://stackoverflow.com/questions/67978444/android-sql-database-not-saving-data?noredirect=1#comment120152438_67978444