Avatar of Southern_Gentleman
Southern_Gentleman
Flag 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

.NET ProgrammingASP.NET

Avatar of undefined
Last Comment
Southern_Gentleman

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Russ Suter

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
David Johnson, CD

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Southern_Gentleman

ASKER
Thanks guys, was able to figure it out.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck