vb.net Code:
Private Sub Oracleview()
'Open the database.
'Delete any existing record
Dim cmd As New SqlCommand
Dim conn As SqlConnection = GetDbConnection()
'Dim a As Integer
Try
Dim Oracle_num As New System.Data.SqlClient.SqlCommand(("SELECT Oracle_no FROM gprdsql.TblOracleNos WHERE Prac_no='" & _
Me.TxtPracNo.Text & "' and Prac_eid = '" & _
Me.TxtPracEid.Text & "' and Pay_method = '" & _
Me.CmbPayMethod.Text & "' "), conn)
Using reader As System.Data.SqlClient.SqlDataReader = Oracle_num.ExecuteReader()
While reader.Read()
Dim Oracle_no As String = FixNull(reader.GetValue(0))
TxtOracleNo.Text = Oracle_no
End While
End Using
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Information, "GCPM")
End Try
End Sub
What I want to do is that, if the text in textbox