VB.NET:
Dim pomain As New PurchaseOrder
Dim objDS2 As Data.DataSet
Dim objUser As New clsPO
Private Sub poAddItem_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
GetItemDetails()
End Sub
Private Sub GetItemDetails()
objDS2.Clear()
objDS2 = objUser.Search_tblUser("Select * from tbl_ITEM where Item_Type = '" & pomain.cboPOItemType.Text & "'")
Try
dg.DataSource = objDS2.Tables(0)
Catch ex As Exception
End Try
End Sub
End Class
i got this error :
An unhandled exception of type 'System.NullReferenceException' occurred in WindowsApplication3.exe
Additional information: Object reference not set to an instance of an object.
what's happen ???