Link to home
Start Free TrialLog in
Avatar of Southern_Gentleman
Southern_GentlemanFlag for United States of America

asked on

IsDBNull

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

ASKER CERTIFIED SOLUTION
Avatar of Russ Suter
Russ Suter

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Southern_Gentleman

ASKER

Thanks guys, was able to figure it out.