Sorry just missed the first line that u r using MySQL database.
for my sql convert functions parameters are
convert(expression,datatype)
or cast can be used as
cast(expression AS datatype)
datatypes
SIGNED {INTEGER}
UNSIGNED {INTEGER}
sqlcodmod="select convert(codmodulo,UNSIGNED) from modasg where cod='"&request("cod")&"'"
set rscodmod=conn.execute(sqlcodmod)
Best Luck..
Nilesh