How to handle "No record found" in OleDbDataAdapter?

liunx

Guest
How to handle "No record found"? Please help.....

Dim conn As OleDbConnection
conn = New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;" _
& "DATA SOURCE=" _
& Server.MapPath("/GISOnline.mdb;"))
Dim blogfillcommand As OleDbDataAdapter
Dim blogposts As New DataSet
blogfillcommand = New OleDbDataAdapter("Select GEOADDRESS, PREMCITY, PREMZIP FROM AddressPoints WHERE GEOADDRESS LIKE '%" & search & "%' ORDER BY GEOADDRESS", conn)
blogfillcommand.Fill(blogposts, "AddressPoints")
Me.Datagrid2.Visible = True
Me.Datagrid2.DataSource = blogposts.Tables("AddressPoints").DefaultView
Me.Datagrid2.DataBind()
 
Back
Top