What I want to achieve whit this code is to test first the value, If Return True, the next item will be process but if return False I will do something before calling the next item to be process
Code:Private Sub loopRequestedCode() Dim isOk As Boolean Dim da As New MySqlDataAdapter() Dim ds As New DataSet() Dim dt As DataTable Dim dr As DataRow Dim conn As MySqlConnection = New MySqlConnection() Try conn.ConnectionString = clsComm.connString() Dim SQL As String = "SELECT * from tbl_request" conn.Open() da.SelectCommand = New MySqlCommand(SQL, conn) Dim myCB As New MySqlCommandBuilder(da) da.Fill(ds, "Request") dt = ds.Tables(0) For Each dr In dt.Rows If isOk = sendRequest(dr(1).ToString(), dr(2).ToString()) Then 'goto next item Else 'if false, do something before going to Next End If Next ds.Dispose() Catch ex As Exception 'TODO: catch error here End Try End Sub




Reply With Quote