well, after one giant headaque i figured out why it didn't work...
in my sql statement i used
date.today (or date.today.tostring("d")) to obtain the date. the result was in this format
08-05-2007. the same format as the date fields in my DB. so i thought that the error could not be this, but it is...althought i don't understand i... to work i had to change the
dd/mm order to
mm/dd using
Date.Today.ToString("MM-dd-yyyy").
so i had:
"SELECT caminho_foto FROM destaques WHERE (data_inicial <= #" & Date.Today.ToString("d") & "#) AND (data_final >= #" & Date.Today.ToString("d") & "#)"
and now i have:
"SELECT caminho_foto FROM destaques WHERE (data_inicial <= #" & Date.Today.ToString("MM-dd-yyyy") & "#) AND (data_final >= #" & Date.Today.ToString("MM-dd-yyyy") & "#)"