I am trying to insert a record into a database, but it does not work on Android, although I did it before. This is the first time I work with multiple tables in ORMLite.
This is what I am trying to do: Storing data from XML into a model Then try to insert data from the model.
Database Used: SQLite ORM: ORMLite
ActivityClass
TbDriverInfoBO tbDriverInfoBO = new TbDriverInfoBO(); Document doc = XMLfunctions.XMLfromString(strResult); NodeList nodes = doc.getElementsByTagName("root"); Element root = (Element) nodes.item(0); jabongModel.setLoginId(XMLfunctions.getValue(root, "UserId")); jabongModel.setPassword(XMLfunctions.getValue(root, "UserPwd")); jabongModel.setDrsno(XMLfunctions.getValue(root, "DRSNo")); jabongModel.setBrancode(XMLfunctions.getValue(root, "BranchCode")); jabongModel.setLoginDate(XMLfunctions.getValue(root, "LoginDate"));
BOClass:
public class TbDriverInfoBO { @DatabaseField(generatedId = true) int id; @DatabaseField String colUserId; ...
I canโt understand where I was wrong. Someone please help !!!
Here is the stack trace (Log Cat received):
01-28 15:43:46.251: D/dalvikvm(368): threadid=1: still suspended after undo (sc=1 dc=1 s=Y) 01-28 15:43:46.251: D/dalvikvm(368): GC_FOR_MALLOC freed 8148 objects / 498080 bytes in 72ms 01-28 15:43:49.514: D/dalvikvm(368): threadid=1: still suspended after undo (sc=1 dc=1 s=Y) 01-28 15:43:50.790: D/dalvikvm(368): threadid=1: still suspended after undo (sc=1 dc=1 s=Y) 01-28 15:43:50.900: I/Database(368): sqlite returned: error code = 1, msg = no such table: tbdriverinfobo 01-28 15:43:58.681: D/dalvikvm(368): threadid=1: still suspended after undo (sc=1 dc=1 s=Y) 01-28 15:44:01.956: D/dalvikvm(368): threadid=1: still suspended after undo (sc=1 dc=1 s=Y)
source share