rpk_Kannan 0 Newbie Poster

hai! every body. please correct this coding.

vb.net with access

table name : Sample.mdb


My Error mistake is :

"The Microsoft Jet database engine cannot find the input table or query 'sample'. Make sure it exists and that its name is spelled correctly."


my coding:


Private Sub btnsearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsearch.Click
txtshow.Text = ""
Dim vsearch As String = InputBox("Enter the Regno:")
If vsearch <> "" Then
cmdOLEDB.CommandText = "select regno, name, total from sample where regno=" & CInt(vsearch)
cmdOLEDB.Connection = cnnOLEDB

Dim rdrOLEDB As OleDbDataReader = cmdOLEDB.ExecuteReader If rdrOLEDB.Read = True Then
txtshow.Text &= rdrOLEDB.Item(0).ToString & "" & rdrOLEDB.Item(1).ToString & "" & rdrOLEDB.Item(2).ToString
rdrOLEDB.Close()
Exit Sub
Else
MsgBox("Record not found")
rdrOLEDB.Close()
End If
Else
MsgBox("Enter the regno:")
Exit Sub
End If


End Sub
End Class