呵呵 兄弟先看哈是不是 select * from user where name='"+y 的问题 我建议你把name=后面的单引号给去掉! 应该是exec="select * from user where name="+y 试试看! 那要不试试exec="select * from user where name='"& y &"' " 再试试看!嘿嘿~~~~~~~~