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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:14:58+00:00 2026-05-27T07:14:58+00:00

I have a basic database that calls on string into the database(well supposed to).

  • 0

I have a basic database that calls on string into the database(well supposed to). Whenever I click the button to save the string into the data base I get an error in my log cat saying it did not write to the data base. the application keeps going but no info shows inside the database.

LOGCAT

12-02 16:39:03.551: E/Database(20828): 0.0
12-02 16:39:03.551: E/Database(20828): 0.0
12-02 16:39:03.551: E/Database(20828): android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed
12-02 16:39:03.551: E/Database(20828):  at android.database.sqlite.SQLiteStatement.native_execute(Native Method)
12-02 16:39:03.551: E/Database(20828):  at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:61)
12-02 16:39:03.551: E/Database(20828):  at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1591)
12-02 16:39:03.551: E/Database(20828):  at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1435)
12-02 16:39:03.551: E/Database(20828):  at http.www.hotapp.com.timeandlocation.db.Database.createEntryLat(Database.java:76)
12-02 16:39:03.551: E/Database(20828):  at http.www.hotapp.com.timeandlocation.TimeAndLocationActivity.onClick(TimeAndLocationActivity.java:131)
12-02 16:39:03.551: E/Database(20828):  at android.view.View.performClick(View.java:2485)
12-02 16:39:03.551: E/Database(20828):  at android.view.View$PerformClick.run(View.java:9089)
12-02 16:39:03.551: E/Database(20828):  at android.os.Handler.handleCallback(Handler.java:587)
12-02 16:39:03.551: E/Database(20828):  at android.os.Handler.dispatchMessage(Handler.java:92)
12-02 16:39:03.551: E/Database(20828):  at android.os.Looper.loop(Looper.java:123)
12-02 16:39:03.551: E/Database(20828):  at android.app.ActivityThread.main(ActivityThread.java:3806)
12-02 16:39:03.551: E/Database(20828):  at java.lang.reflect.Method.invokeNative(Native Method)
12-02 16:39:03.551: E/Database(20828):  at java.lang.reflect.Method.invoke(Method.java:507)
12-02 16:39:03.551: E/Database(20828):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
12-02 16:39:03.551: E/Database(20828):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
12-02 16:39:03.551: E/Database(20828):  at dalvik.system.NativeStart.main(Native Method)

ENTRY METHOD

public long createEntryLat(String slat) {
    // TODO Auto-generated method stub

    ContentValues cv = new ContentValues();
    cv.put(KEY_LATITUDE, slat);
    return ourdb.insert(DATABASE_TABLE, null, cv);

}

LINE 73

    return ourdb.insert(DATABASE_TABLE, null, cv);

ONCLICK METHOUD

case R.id.button001:

    lat = (EditText)findViewById(R.id.textLat);
     String slat = lat.getText().toString();
        //String slon = lon.getText().toString();

        Database entries = new Database (this);
        entries.open();

        entries.createEntryLat(slat);
        entries.close();

        break;

LINE 131

Database entries = new Database (this);

I have no idea what I am doing wrong and would love any help thanks.

  • 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-05-27T07:14:59+00:00Added an answer on May 27, 2026 at 7:14 am

    I had to uninstall my application then re-install it for my changes to take action.

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

Sidebar

Related Questions

Another basic Rails question: I have a database table that needs to contain references
I have a basic MVC application that is using NHibernate for OR/M and data
I am implementing a very simple file database. I have 2 basic operations: void
I have a basic form with controls that are databound to an object implementing
I have a basic CRUD form that uses PageMethods to update the user details,
I have a basic ActiveRecord model in which i have two fields that i
I've got a very basic database schema and have created a dbml from it.
I have a simple winforms application that I am connecting to my database with
I have a class in VB with some constants that represent the string name
I have a basic domain object, say like Person or Campaign or Event that

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.