comincia a togliere le virgolette posteriori e a farne un cast:
codice:
sql2="select count(*) as nmes from messaggi where cod_arg="& clng(arg2)