Yes, there is such property but as was said in the reply, it addresses the
problem but doesn't remove it e.g you still need to do the check,.
You could have a check like this:
If sqlDataReader.HasRows Then
DataGrid1.DataSource = sqlDataReader
DataGrid1.DataBind()
Else
Label1.Text = "No records found"
End If
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Stijn Verrept" <stijn@no_s.p.a.n.entrysoft.com> wrote in message
news:40**********************@news.skynet.be...
I am having the same problem as the person in this thread mentions:
http://groups.google.be/groups?q=asp...hasrows&hl=nl&
lr=&ie=UTF-8&oe=UTF-8&selm=u2ct0sgzCHA.640%40TK2MSFTNGP12&rnum=1
Somebody says that framework 1.1 will have a HasRows property but this
doesn't seem true. Is there such a property and if not is there a good
solution yet?
--
Kind regards,
Stijn Verrept.