• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

VB .NET odbc help

GoHAnSoN

Senior member
I need to popup a text box when the search returns empty.
How do i do that ?? Have been googling all around, cannt find the answer.

Anyone help pls ?
Here's piece of my code.

Try
Me.DataSet11.Clear()
Me.OdbcConnection1.ConnectionString = connectionString
Me.OdbcSelectCommand1.CommandText = searchString
Me.OdbcSelectCommand1.Connection = OdbcConnection1
' Open connection
Me.OdbcConnection1.Open()

# add code here for "if empty do something" ? But how ?
#

Me.OdbcDataAdapter1.Fill(DataSet11)

Me.OdbcConnection1.Close()


Catch Excep As Exception
Me.OdbcConnection1.Close()
MessageBox.Show(Excep.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

End Try
 
got any better ones ? i was actually looking for an exception... is there any ? or i have to settle with rows.count ?
 
Originally posted by: GoHAnSoN
got any better ones ? i was actually looking for an exception... is there any ? or i have to settle with rows.count ?

You won't receive an exception if your query returns no data. It is simply that, no data/nothing.
 
Back
Top