You need to sign in to do that
Don't have an account?
onCollect
Insert null value from SF to Sql Server
Hi,
I am inserting field values from SF to my SQL server. Some of my custom fields are empty.
As a result when using binding.Query(to retrieve fields ) it's giving me following error.
failed here
Nullable object must have a value.
Nullable object must have a value.
i am using following code to prevent the program from crashing. But its not working.
If contact.User_ID__c.Value = False Then
contact.User_ID__c = ""
contact.User_ID__cSpecified = True
cmd.Parameters.AddWithValue("@UserId", contact.User_ID__c)
Else
cmd.Parameters.AddWithValue("@UserId", contact.User_ID__c)
contact.User_ID__cSpecified = True
End If
suggestions..
thanks
DevAngel
Don't know exactly how you are doing this, but this looks like an ADO.net error. Check how you are constructing the Table object and make sure that you don't specify any restrictions on the Column objects for the Table.