Help with this

G

Guest

Hi,
I have the foll code. Is there a way to check my Obj if the returned reader
is empty before binding my grid (in the case below) without creating another
reader like
(dim reader as sqlDatereader
reader = oBj.GetProcessed(parameters)
If reader.Hasrows then

End If)



Private Sub GetProcessed()

Dim oBj As web.Component = New web.Component
grdProcessing.DataSource = oBj.GetProcessed(cbo1.SelectedValue,
cbo2.SelectedValue.Trim,txtDate.Text)
grdProcessing.DataBind()

If grdProcessing.Items.Count = 0 Then

lblMessage.Text = "Empty"

End If


End Sub


Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top