Hi
I am using Sql2005 Express . In the below code it is giving me error "Incorrect Syntax near #"
rs.Open "Select distinct(Shiftcode) from shift where effectivefrom=(select max(effectivefrom) from shift where effectivefrom<=#" & DTPicker1.Value & "#)", cnn1, adOpenDynamic, adLockOptimistic, adCmdText
Thanks
I am using Sql2005 Express . In the below code it is giving me error "Incorrect Syntax near #"
rs.Open "Select distinct(Shiftcode) from shift where effectivefrom=(select max(effectivefrom) from shift where effectivefrom<=#" & DTPicker1.Value & "#)", cnn1, adOpenDynamic, adLockOptimistic, adCmdText
Thanks