Hi guys,
i just faced a problem when trying to execute the following query.I searched for the exception on the internet and found that using a reserved keyword might raise this issue,and using brackets may solve this problem.But i use brackets all the time in my sql statements but still the exception 'IErrorInfo.GetDescription failed with E_FAIL(0x80004005).' comes up.
Please give me some hand so i could proceed to my task.
qry2 = "SELECT * FROM [per_diem_accomodation] WHERE [project number]='" & projcode & "' AND [employee number]='" & empcode & "'" & _
"AND [current month]=(SELECT MAX(current month) FROM [per_diem_accomodation] WHERE [project number]='" & projcode & "' AND [employee number]='" & empcode & "')"