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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:12:37+00:00 2026-05-24T19:12:37+00:00

The field type is money, if I put a ‘0’ or a ‘1’ in

  • 0

The field type is money, if I put a ‘0’ or a ‘1’ in the field I get this error:

System.Reflection.TargetInvocationException:

Exception has been thrown by the target of an invocation. --->
System.InvalidCastException: Specified cast is not valid.

 at System.Data.SQLite.SQLiteDataReader.VerifyType(Int32 i, DbType typ)
 at System.Data.SQLite.SQLiteDataReader.GetBoolean(Int32 i)

 --- End of inner exception stack trace ---

This is from the model designer:

<Property Name="Amount" Type="decimal" Precision="53" />  

====

    <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=True)>
<DataMemberAttribute()>
Public Property Amount() As Nullable(Of Global.System.Decimal)
    Get
        Return _Amount
    End Get
    Set(ByVal value As Nullable(Of Global.System.Decimal))
        OnAmountChanging(Value)
        ReportPropertyChanging("Amount")
        _Amount = StructuralObject.SetValidValue(value)
        ReportPropertyChanged("Amount")
        OnAmountChanged()
    End Set
End Property

Private _Amount As Nullable(Of Global.System.Decimal)
Private Partial Sub OnAmountChanging(value As Nullable(Of Global.System.Decimal))
End Sub

Private Partial Sub OnAmountChanged()
End Sub

Code to get error:

 Dim Query = From c In EnData.Transactions Where c.TranID = 660 ' this tran is the amount 0

        For Each tran In Query 'Error here

        Next
  • 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-24T19:12:38+00:00Added an answer on May 24, 2026 at 7:12 pm

    I Got the problem… its not the amount field. an other column which is a bit type, some times it doesn’t like the way I wrote the false or true. that causes the problem.

    The solution is to use 1 for true and 0 for false, that is always ok.

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

Sidebar

Related Questions

I have this error called Inconsistent accessibility: field type 'world' is less accessible than
I have this Points table: =========================================== FIELD : TYPE =========================================== id int(11) user_id int(11)
How get name of field type file in beforeSave()? I have form with many
My module defines a custom field type with hook_field_info() . In hook_install() of this
I have a field type varchar in sql server. It contains data like 010109
I'm trying to implement a custom field type for my Symfony2 forms but for
What is the adequate MySQL field type for weight (in kilograms) and height (meters)
I've created a custom field type in Joomla and need to pass parameters to
I need to sort on a date-field type, which name is mod_date. It works
MySQL stores the date in my database (by default) as 'YYYY-MM-DD' The field type

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.