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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:42:55+00:00 2026-05-27T01:42:55+00:00

I am trying to update cached_name column of callog.calls table in android,but getting sql

  • 0

I am trying to update cached_name column of callog.calls table in android,but getting sql lite exception .I have been trying this for long but could not able to come up with anything.I have searched a lot but could not find sufficient information about update statement.kindly help.

ContentResolver cr = getContentResolver(); 

            Cursor cur = cr.query(CallLog.Calls.CONTENT_URI,
                null, null, null, null);
ContentValues value=new ContentValues();
value.put("CallLog.Calls.CACHED_NAME","frank");
  cr.update(CallLog.Calls.CONTENT_URI,value,CallLog.Calls.CACHED_NAME, null);

Error:

11-25 20:11:17.755: ERROR/Database(106): Error updating CallLog.Calls.CACHED_NAME=frank using UPDATE calls SET CallLog.Calls.CACHED_NAME=? WHERE name

11-25 20:11:17.776: ERROR/DatabaseUtils(106): Writing exception to parcel

11-25 20:11:17.776: ERROR/DatabaseUtils(106): android.database.sqlite.SQLiteException: near ".": syntax error: , while compiling: UPDATE calls SET CallLog.Calls.CACHED_NAME=? WHERE name
  • 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-27T01:42:56+00:00Added an answer on May 27, 2026 at 1:42 am

    The syntax of your call to update is wrong. It needs to look like this:

    cr.update(CallLog.Calls.CONTENT_URI,value,null, null);
    

    that will update all the values in the table. To update a specific row do:

    cr.update(CallLog.Calls.CONTENT_URI,value,CallLog.Calls.CACHED_NAME +" = ?", new String[]{oldName});
    

    where oldName is the value to use in your WHERE clause.

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

Sidebar

Related Questions

I'm trying to update a hashtable in a loop but getting an error: System.InvalidOperationException:
I am trying to update a column in my table which was last inserted.
I have some trouble when trying to update a table by looping cursor which
I am getting an exception trying to use update/extract with PDF files My Set
I trying to update a model on a callback but the validation is causing
I am trying to update a field in a table with data from another
So I'm trying to update an object in my MS SQL 2005 database using
I'm trying to update an NText field in SQL 2000 using Classic ASP. Here
I have been trying to get SqlCacheDependency working. I think I have everything set
I been trying to get sqlcachedependecy working, but it doesn't appear to work I

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.