Your query like this
Dim string1 As String = ""
string1 = "Select sanctioned_amt from details_gpf_advance_employee where empid=" + eid + " and "
string1 += "DatePart(Month, sanction_order_dt) = " + j + ""
sanctioned_amt = Dal.ExScalar(string1)
Write like this
Dim string1 As String
string1 = "Select sanctioned_amt from details_gpf_advance_employee where empid=" + eid + " and "
string1 += "DatePart(Month, sanction_order_dt) = " + j + ""
sanctioned_amt = Dal.ExScalar(string1)
Now it will work
Thanks,
SP