Hi, I have a object which returns a populated DataSet object from an SQL database.
I can populate a datagrid with all the information by binding the datagrid to the returned information; similiar to this (
What I want to do then is filter the rows stored in the DataSet buy using a the filter method of a dataviewCode:Dim oDataSet as dataset ' Return a dataset from my object oDataSet = oMyObjectReference.MethodName("markj") ' Bind the retrieved dataset to a datagrid (dgStudentInfo is the name of the datagrid) dgStudentInfo.DataSource = oDataSet dgStudentInfo.DataBind()
I thought I could just go...
When I run this I get an "System.NullReferenceException: Object reference not set to an instance of an object." on the following line;Code:Dim oDataView As DataView oDataView = oDataSet.Tables("students").DefaultView
oDataView = oDataSet.Tables("students").DefaultView
Its seems that I am trying to reference a NULL object..... Also is there a .NET equivalent of the isObject() function??
Thanks for your help
MarkusJ




Reply With Quote