Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9274991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:29:00+00:00 2026-06-18T16:29:00+00:00

I have been trying to insert a record into the database but its not

  • 0

I have been trying to insert a record into the database but its not working in Android even though I have done it before. This is the first time I am working with multiple tables in ORMLite.

This is what I am trying to do:
Storing data from XML into a model
Then trying to insert the 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"));
//clsDriverInfo obj = new clsDriverInfo(loginId, pswd, drsno,
/*tbDriverInfoBO.setColUserId(jabongModel.getLoginId());
tbDriverInfoBO.setColPwd(jabongModel.getPassword());
tbDriverInfoBO.setColDrs(jabongModel.getDrsno());
tbDriverInfoBO.setColBranch(jabongModel.getBrancode());*/

tbDriverInfoBO.fillBo(jabongModel);

dbHelperTbDriverInfo.addData(tbDriverInfoBO);

BOClass:

public class TbDriverInfoBO {

    @DatabaseField(generatedId = true)
    int id;
    @DatabaseField
    String colUserId;
        ...

        // getters and setters

    public TbDriverInfoBO(String colUserId, String colPwd, String colDrs, String colBranch)
    {
        this.colBranch = colBranch;
        this.colDrs = colDrs;
        this.colPwd = colPwd;
        this.colUserId = colUserId;
    }

    public TbDriverInfoBO() {
        // TODO Auto-generated constructor stub
    }
    public void fillBo(JabongModel jabongModel)
    {
       this.colBranch = jabongModel.getBrancode();
       this.colDrs = jabongModel.getDrsno();
       this.colPwd = jabongModel.getPassword();
       this.colUserId = jabongModel.getLoginId();
       //this.id = jabongModel.getId();

    }
}



DBHelperClass
public int addData(TbDriverInfoBO tbDriverInfoBO) {
    int i=0;
    RuntimeExceptionDao<TbDriverInfoBO, String> dao = getTbDriverInfoDaO();
    try{
     i = dao.create(tbDriverInfoBO);
    }
    catch (Exception e) {
        e.getStackTrace();// TODO: handle exception
    }
    return i;
}

I cannot make out where have I gone wrong. Somebody please help!!!

Here is the stack trace(Log Cat Obtained):

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)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T16:29:02+00:00Added an answer on June 18, 2026 at 4:29 pm

    Looks to me that you are not creating the table for tbdriverinfobo.

    sqlite returned: error code = 1, msg = no such table: tbdriverinfobo
    

    Can you show your onCreate() method in the helper? Does your application have an existing database and you’ve added this table afterwards? Do you need to increment your database version number?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to insert a row into my table in my database,
I have been trying to get my C# program to insert records directly into
So basically I have been trying to insert columns into my third table from
I am trying to insert a record. This code worked but has stopped working
I am relatively new to Perl.I have been trying to insert data to database
I have been trying for almost a week now to create an SQLite database
I have been trying to do insert / update records in a mysql table.
I have been trying to introduce a Merge statement into the following SQL query
I have been trying for this but no success. I am using PHP, HTML,
I'm trying to input orders into a MySQL database. It adds one record per

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.