Ho corretto così e ora sembra che funge:![]()
sSql = "SELECT *, convert(varchar(2),Giorno) + '/' + convert(varchar(2),Mese) + '/' + convert(varchar(4),Anno) AS DataMatta FROM master WHERE (1=1 "
if livello<>"" then
sSql = sSql + " AND livello='"&livello&"'"
end if
if regione<>"" then
sSql = sSql + " AND regione='"®ione&"'"
end if
if universita<>"" then
sSql = sSql + " AND universita='"&universita&"'"
end if
if facolta<>"" then
sSql = sSql + " AND facolta='"&facolta&"'"
end if
sSql = sSql + ") ORDER BY id DESC"