Try Dim sql As String = "SELECT MAX(ppo_no) FROM Pension_Master where state_code= '" & TextBox9.Text & "' " Dim comm As SqlCommand = New SqlCommand(sql, myconn) myReader = comm.ExecuteReader If myReader.HasRows Then While myReader.Read() temp = myReader.Item("TextBox5.Text") + ("TextBox9.Text") End While End If Catch ex As Exception End Try TextBox8.Text = String.Concat(temp) 'TextBox8.Text = TextBox5.Text & TextBox9.Text myReader.Close() cmd.ExecuteNonQuery()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)