HO corretto così...non mi da errori ma cmq mi da sempre tutti i record del database senza pensare a nessun where.
sSql = "SELECT *, convert(varchar(2),Giorno) + '/' + convert(varchar(2),Mese) + '/' + convert(varchar(4),Anno) AS DataMatta FROM master WHERE (1=1 "
if livello<>"" and livello<>NULL then
sSql = sSql + " AND livello='"&livello
end if
if regione<>"" and regione<>NULL then
sSql = sSql + " AND regione='"®ione
end if
if universita<>"" and universita<>NULL then
sSql = sSql + " AND universita='"&universita
end if
if facolta<>"" and facolta<>NULL then
sSql = sSql + " AND facolta='"&facolta
end if
sSql = sSql + ") ORDER BY id DESC"