写代码要注意细节,你设参数的时候弄反了
ps.setString(1,apassword); ps.setString(2,aname);
把你的数据库字段apassword的类型修改为字符串,即VARCHAR