Hi guys,
I wanted to extract a field from a table by date and two other criterias,but it's giving me an exception.
The field that is a long integer data type and i used integer in the code.And the date is also available in the database.
Am i missing something?
resultdate = DateTimePicker1.Text
qry = "SELECT * FROM [per_diem_accomodation] WHERE [project number]='" & projcode & "' AND [employee number]='" & empcode & "' AND " & _
"[current month]='" & resultdate & "'"
Dim dr1 As OleDb.OleDbDataReader = GetData(qry)
If dr1.HasRows = True Then
Do While dr1.Read
pdanumber = (CInt(dr1.Item("pda number")))
Loop
End If