Dim DD As New MySqlDataAdapter("select * from TableA ID", conn)
Dim DAA As New DataTable
DD.Fill(DAA)
If DAA.Rows.Count > 0 Then
Dim tid As String
tid = DAA.Rows(0).Item("ID")
Dim A As String = ("0")
If tid > A Then
Dim Ad As New MySqlDataAdapter("select * from TableB where ID=" & tid, conn)
Dim DDSA As New DataTable
Ad.Fill(DDSA)
If DDSA.Rows.Count > 0 Then
TextBox1.Text = DDSA.Rows(0).Item("id")
Else
'MsgBox("account not exist/invalid Id")
End If
End If
End If
Dim Ad As New MySqlDataAdapter("select * from TableB where ID='" & tid & "' ", conn)
If DDSA.Rows.Count > 0 Then
TextBox1.Text = DDSA.Rows(0)("ID").ToString
Else
'MsgBox("account not exist/invalid Id")
End If