i am doing search engine and can i have problem retriving data in the textfields after i press the search button.
here the code i write
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Documents and Settings\Yee\My Documents\Assignment2.mdb"
Dim MySQL As String = "select* from Customer" & _
"where CustomerNRIC = 'txtNRIC'"
Dim MyConn As New OleDbConnection(strConn)
Dim cmd As New OleDbCommand(MySQL, MyConn)
MyConn.Open()
'-- CHECK FOR VALID RECORD ---
Dim ValidRecord As Boolean = True
'-- Check for missing customer nric
If txtNRIC.Text = "" Then
MsgBox("Missing customer NRIC")
ValidRecord = False
End If
Try
cmd.ExecuteNonQuery()
MyConn.Close()
here the code i write
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Documents and Settings\Yee\My Documents\Assignment2.mdb"
Dim MySQL As String = "select* from Customer" & _
"where CustomerNRIC = 'txtNRIC'"
Dim MyConn As New OleDbConnection(strConn)
Dim cmd As New OleDbCommand(MySQL, MyConn)
MyConn.Open()
'-- CHECK FOR VALID RECORD ---
Dim ValidRecord As Boolean = True
'-- Check for missing customer nric
If txtNRIC.Text = "" Then
MsgBox("Missing customer NRIC")
ValidRecord = False
End If
Try
cmd.ExecuteNonQuery()
MyConn.Close()