I have a strongly typed dataset that is returning an error when the corresponding field in the database is DBNull. The error I get is:
System.Data.StrongTypingException was unhandled by user code
Message="The value for column 'Client_Billing_Contact' in table 'Client' is DBNull."
Source="App_Code.arfnv1r7"
StackTrace:
at slaClient.ClientRow.get_Client_Billing_Contact() in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\slabob\5f562902\4fcd322\App_Code.arfnv1r7.3.vb:line 1662
at order_orderheader.loadClientData(String clientID) in C:\VS2005\SLABOB\order\orderheader.aspx.vb:line 354
at order_orderheader.txtClientID_TextChanged(Object sender, EventArgs e) in C:\VS2005\SLABOB\order\orderheader.aspx.vb:line 373
at System.Web.UI.WebControls.TextBox.OnTextChanged(EventArgs e)
at System.Web.UI.WebControls.TextBox.RaisePostDataChangedEvent()
at System.Web.UI.WebControls.TextBox.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent()
at System.Web.UI.Page.RaiseChangedEvents()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I tried to trap the error in the code that binds the field to a textbox, but when I set a breakpoint the error happens before it reaches this code. Checking the error above, it happens in a VS created code file.
I have searched for this error and found that I am not the only one that has this problem. However none of the solutions work for me. I don't know where/how to check for this error. I tried to trap the error in the VS file when I get the error, but that doesn't work either. Help. Thanks.
Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.