> 文章列表 > cannot be resolved to a variable

cannot be resolved to a variable

cannot be resolved to a variable

关于cannot be resolved to a variable这个很多人还不知道,今天小六来为大家解答以上的问题,现在让我们一起来看看吧!

1、嗯。

2、这个问题很有深度,经过我代码粘贴和MyEclipse测试,终于知道什么问题了。

3、主要是ResultSet rs=***.executequery(\"select * from cc\");中sql没有定义,因为sql在try,catch范围内,需要把这条与句改为: try{ Connection con=***.getconnection(\"jdbc:odbc:ee\"); Statement sql=***.createstatement(); ResultSet rs=***.executequery(\"select * from cc\");} catch(SQLException e){ }。

本文到此分享完毕,希望对大家有所帮助。