Good catch!
>>>In String you need to omit ?. String is not a simple type like integer, for example. So, you can pass null without declaring string?, just declare parameter as string.
>>
>>So, the adjustment I made is this:
>>
>>
>> ' Avoid to receive a null
>> ' expC1 Value
>> Public Function GetNonNullable(ByVal tcValue As String) As String
>> Dim lcValue As Integer = ""
>>
>> ' If we have a value
>> If Not tcValue Is DBNull.Value Then
>> lcValue = tcValue
>> End If
>>
>> Return lcValue
>> End Function
>>
>
>
>You're dim'ing lcValue as integer but filling it with a string.... ???
If it's not broken, fix it until it is.
My Blog