I have an error Data type mismatch in criteria expression when I run the application. Below are my codes.
Please help.
Many thanks in advance.
Chong
Code:
Private Shared mdbPath As String = Application.StartupPath & "\Scholarship.mdb"
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mdbPath
Dim strSQL As String
Dim rdrEdu As OleDbDataReader
Dim cn As New OleDbConnection(strConn)
cn.Open()
strSQL = "SELECT SSN, Status, HghSchoolGPA, ACT, SAT," & _
"TotalCredits, GPALstSemester, GPACumulative, Rank " & _
"FROM Education WHERE Education.SSN=" & "" & intSSN & ""
Dim cmdSQL As New OleDbCommand(strSQL, cn)
Try
rdrEdu = cmdSQL.ExecuteReader
Catch dbException As System.Data.OleDb.OleDbException
MessageBox.Show(dbException.Message)
End Try
Please help.
Many thanks in advance.
Chong
Last edited by a moderator: