필드 유형 "지정한 캐스트가 잘못되었습니다"은 돈이다 '0'또는 '1'현장에서이 오류가 얻을 :SQLite는 - 오류 : 내가 넣을 경우
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 ---
을
<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
코드 :
01이 모델 디자이너에서입니다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
코드를 보여주십시오. –
몇 가지 코드를 추가했습니다.이 코드는 무엇을 찾고 있습니까? – Ezi
금액을 설정하는 코드를 Google에 표시 할 수 있습니까? – arviman