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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T21:27:49+00:00 2026-05-28T21:27:49+00:00

Hi guys i am trying to do this ContentValues initialValues = new ContentValues(); initialValues.put(monthlyBudget,account.monthlyBudge

  • 0

Hi guys i am trying to do this

    ContentValues initialValues = new ContentValues();

  initialValues.put("monthlyBudget",account.monthlyBudge

where MonthlyBudget is BigDecimal variable.

Now it gives an error that change the type of monthlyBudget to String.

How can i resolve this issue.

  • 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-28T21:27:49+00:00Added an answer on May 28, 2026 at 9:27 pm

    The ContentValues documentation lists all the overloads of put – and none of them takes a BigDecimal, so I’m not surprised it’s failing.

    Two options you could take:

    • If this is a currency value (which it sounds like) you may be able to deal with it to a fixed precision, e.g. 2 decimal places, and with relatively limited range. Just multiply your BigDecimal by 100, take the integer result as a long and then put the long into your ContentValues. When you extract it later, create a BigDecimal from the long and divide it by 100. (Or change all your code to treat the budget as an integer number of cents everywhere, potentially.)

    • You could store the string representation, and pass that string to the BigDecimal constructor when you fetch it.

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

Sidebar

Related Questions

Hello Guys I am trying to figure out why i am gettings this error
guys I'm trying to compile my program in c but I'm getting this error
Hey guys, trying to optimize this query to solve a duplicate user issue: SELECT
Hey guys I am having a lot of trouble trying to understand this and
Hey guys, I have a problem (again). This time I am trying to use
i am getting this error when i'm trying to create a report using the
Hey guys, i'm trying this example from Dave Ward blog about jQuery Templates and
I've been trying to solve this problem for a while now, and I'm at
guys I'm trying to correct an application... where I found this lines of code:
Hey guys, I'm using smarty and php I am trying to make this function

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.