My Primary Key of my table is of type BigInt.
I load my data into a DataReader and then I call my function to see if the field is Null:
Here is my function code:
I keep getting the message: "Specified cast is not valid" on the line Return DataReader.GetInt32(iValue).
If I change it to return a Int64, I get the following message: "Option Strict On disallows implicit conversions from Long to Integer."
I am not sure how to pass back a BigInt?
Could someone point me in the right direction.
Thanks
I load my data into a DataReader and then I call my function to see if the field is Null:
Code:
CheckDBNullBigInt(dr, 0)
Code:
Public Shared Function CheckDBNullInt(ByVal DataReader As IDataReader, ByVal iValue As Int32) As Int32
If Not DataReader.IsDBNull(iValue) Then
Return DataReader.GetInt32(iValue)
End If
Return 0
End Function
I keep getting the message: "Specified cast is not valid" on the line Return DataReader.GetInt32(iValue).
If I change it to return a Int64, I get the following message: "Option Strict On disallows implicit conversions from Long to Integer."
I am not sure how to pass back a BigInt?
Could someone point me in the right direction.
Thanks