Seems something is wrong in the convert statement (line 9), hope i'm suggesting the correct data type as i dont have mySQL installed here, but anyways the apporach is correct.
u can give one more try as
sql="select convert(cod, INT), idusuario, password, nombre from administracion order by cod"
or
sql="select convert(cod, INT) as cod, idusuario, password, nombre from administracion order by cod"
have u tried the cast function ?
following url may help u further
http://www.mysql.com/doc/en/Numeric_types.htmlhttp://www.mysql.com/doc/en/Cast_Functions.html
Best Luck..
Nilesh