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 9156867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:52:25+00:00 2026-06-17T12:52:25+00:00

When I attemp to create/add data to my SQLite database I get a great

  • 0

When I attemp to create/add data to my SQLite database I get a great many errors but do not know why as it looks as tho it should work to me. The code is bellow and ill post the errors below that. Thanks a million in advance for any help.

enter code here
public class MyActivity extends Activity
{
   @Override
   public void onCreate(Bundle savedInstanceState)
   {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);

      //create an instance of the PlayerDatabase class and pass this context through parameters;
      PlayerDatabase playerProfile = new PlayerDatabase(this);

      try
      {
         //open the database;
         playerProfile.open();
      }//try;
      catch (SQLException e)
      {
         //print description of the error;
         e.printStackTrace();
      }//catch;

      //insert data into the table;
      playerProfile.createInsert("Player", "Connor", "5", "1234");
      //close the database;
      playerProfile.close();
   }//onCreate;
}//class;



public class PlayerDatabase
{
   public static final String KEY_PLAYER = "Player";
   public static final String KEY_NAME = "Name";
   public static final String KEY_GUESSES = "NumberOfGuesses";
   public static final String KEY_NUMBER= "NumberToGuess";

   private static final String DATABASE_NAME = "PlayerData.db";
   private static final String DATABASE_MARKSTABLE = "PlayerData";
   private static final int DATABASE_VERSION = 1;

   //create instance of DbHelper class called ourHelper;
   private DbHelper ourHelper;
   //create a context called ourContext;
   private final Context ourContext;
   //create an instance of SQLiteDatabase called ourDatabase to be the database;
   private SQLiteDatabase ourDatabase;


   //constructor to pass through context;
   public PlayerDatabase(Context c)
   {
      ourContext = c;
   }//constructor;


   //open the database;
   public PlayerDatabase open()throws SQLException
   {
      //finish creating the instance of the DbHelper class;
      ourHelper = new DbHelper(ourContext);
      //create database;
      ourDatabase = ourHelper.getWritableDatabase();
      return this;
   }//open;

   //close the database;
   public void close()
   {
      ourHelper.close();
   }//close;


   //insert data into the database;
   public long createInsert(String player, String name, String guesses,
                        String number)
   {
      // TODO Auto-generated method stub
      ContentValues cv = new ContentValues();
      cv.put(KEY_PLAYER, player);
      cv.put(KEY_NAME, name);
      cv.put(KEY_GUESSES, guesses);
      cv.put(KEY_NUMBER, number);
      return ourDatabase.insert(DATABASE_MARKSTABLE, null, cv);
   } //createInsert;




   //DbHelper class within PlayerDatabase class;
   private static class DbHelper extends SQLiteOpenHelper
   {

      public DbHelper(Context context)
      {
         super(context, DATABASE_NAME, null, DATABASE_VERSION);
         // TODO Auto-generated constructor stub
      }//DbHelper constructor;


      //when DbHelper is first created it will create this table;
      @Override
      public void onCreate(SQLiteDatabase db)
      {
         // TODO Auto-generated method stub
         db.execSQL(" CREATE TABLE " + DATABASE_MARKSTABLE + " (" +
             KEY_PLAYER + " TEXT PRIMARY KEY, " +
             KEY_NAME + " TEXT NOT NULL, " +
             KEY_GUESSES + " TEXT NOT NULL, " +
             KEY_NUMBER + " TEXT NOT NULL);"
         );
      }//DbHelper onCreate;


      //only used when database is upgraded;
      @Override
      public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
      {
         // TODO Auto-generated method stub

         db.execSQL("DROP TABLE IF EXISTS " + DATABASE_MARKSTABLE);
         onCreate(db);
      }//DbHelper onUpgrade;
    } //class DbHelper;
}//class;

THIS IS THE ERROR REPORT

12-27 13:15:43.549: ERROR/ActivityThread(6572): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cea8d8 that was originally bound here
        android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cea8d8 that was originally bound here
        at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
        at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
        at android.app.ContextImpl.bindService(ContextImpl.java:1418)
        at android.app.ContextImpl.bindService(ContextImpl.java:1407)
        at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
        at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
        at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
        at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
        at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
        at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
        at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
        at android.os.AsyncTask$2.call(AsyncTask.java:287)
        at java.util.concurrent.FutureTask.run(FutureTask.java:234)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
        at java.lang.Thread.run(Thread.java:856)
12-27 13:15:43.549: ERROR/StrictMode(6572): null
        android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cea8d8 that was originally bound here
        at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
        at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
        at android.app.ContextImpl.bindService(ContextImpl.java:1418)
        at android.app.ContextImpl.bindService(ContextImpl.java:1407)
        at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
        at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
        at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
        at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
        at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
        at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
        at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
        at android.os.AsyncTask$2.call(AsyncTask.java:287)
        at java.util.concurrent.FutureTask.run(FutureTask.java:234)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
        at java.lang.Thread.run(Thread.java:856)
12-27 13:15:43.739: ERROR/ActivityThread(6572): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cd08b0 that was originally bound here
        android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cd08b0 that was originally bound here
        at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
        at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
        at android.app.ContextImpl.bindService(ContextImpl.java:1418)
        at android.app.ContextImpl.bindService(ContextImpl.java:1407)
        at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
        at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
        at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
        at com.android.emailcommon.service.AccountServiceProxy.getDeviceId12-27 13:24:07.950: ERROR/StrictMode(6572): null
12-27 13:24:10.041: ERROR/ThrottleService(6245): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
  • 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-17T12:52:27+00:00Added an answer on June 17, 2026 at 12:52 pm

    The errors you’re seeing are from the inbuilt email app in Android. It seems to have a leaky ServiceConnection, and you’re seeing some errors because of that in the LogCat. This is completely unrelated to your app, and you can safely ignore it.

    In the future, you can try filtering the logcat using your apps process ID so that only messages from your app are shown, and messages like this which may lead to false positives are hidden.

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

Sidebar

Related Questions

I am using the NetDataContractSerializer. I can create, add and serialize objects into data
I'm attempting to create a SQLite db and populate it with data initially. When
I know this isn't a unique issue but I've not had much luck finding
this is my first attemp to create a frontController and I've come over some
I found only one attempt to create such compiler - http://sourceforge.net/projects/xsltc/ . But this
I've decided to take the advice in this question: create-excel-chart-programmatically-in-php and NOT attempt to
So I have a 2D array (named Data) that looks like: Shape 0 Shape
We're using EF Code first, and have a data context for our sales database.
I have a model that looks like this: class Pdf extends \lithium\data\Model { protected
I was trying to create a Dynamic Data Website using VS 2010 RC. An

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.