我不断收到ClosingDate 的"类型为‘Date’的值无法转换为‘Decimal?’"的错误
请帮帮我。
Public Function Update(ByVal pAccountID As Short, ByVal pAccountTypeID As Short,ByVal pCustomerName As String, ByVal pOpeningDate As DateTime, ByVal pClosingDate As DateTime, ByVal pBalance As Double) As Boolean
catchError = String.Empty
Try
accountTableAdapter.Update(AccountID, AccountTypeID, CustomerName, OpeningDate, ClosingDate, Balance)
Return True
Catch ex As Exception
catchError = ex.Message
Return False
End Try
End Function
您可能已经将accountTableAdapter
的closingDate的列数据类型设置为Decimal
。您需要将其更改为DateTime