End Of File

  • Thread starter Thread starter Aymer
  • Start date Start date
A

Aymer

Scenario: I have a SqlDataAdapter that I used to populate
a dataset.
oAdapter = New SqlDataAdapter(oCmd)
oDataSet = New DataSet()
oAdapter.Fill(oDataSet)

I then use the dataset to populate a datagrid.
dgFilings.DataSource = oDataSet
dgFilings.DataBind()

Problem: I don't want to populate the datagrid if there
were no records return from the query. So how do i check
if the dataset or the DataAdapter is empty or not?

In classic asp this would be done with the recordset
method eof().

thanks for your help,
aymer
aymerb[@].yahoo.com
 
Check (post Fill)
If oDataSet.Tables(0).Rows.Count = 0 Then ... (no rows returned by first
resultset).

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top