We help IT Professionals succeed at work.
Get Started


Last Modified: 2015-07-20
This is probably a simple question but i'm having trouble with Null Values from a Querystring. This data is being pulled from a Dataset.
Conversion from type 'DBNull' to type 'Date' is not valid.

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not String.IsNullOrEmpty(Request.QueryString("OrderID"))) Then
            Me.lblOrderId.Text = Request.QueryString("OrderID")
        End If
 Dim order As New artemailformdata.OrdersDataTable()
        Dim orderAdapater As New artemailformdataTableAdapters.OrdersTableAdapter()
        order = orderAdapater.GetData(Convert.ToInt32(Request.QueryString("OrderId")))
  If order.Count <> 0 Then
lblInHands.Text = order.Item(0).InHands
            lblFADC.Text = order.Item(0).FrontArtDC
End If
End Sub

Open in new window

Watch Question
Senior Software Developer
This problem has been solved!
Unlock 2 Answers and 3 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE