急求cannot be resolved怎么改呀?
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/17 04:59:13
急求cannot be resolved怎么改呀?
import java.sql.*;
public class Ss {
public static void main(String[] args) {
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");}
catch(ClassNotFoundException e){}
Connection con=DriverManager.getConnection("jdbc:odbc:ee");
try{Statement sql=con.createStatement();}
catch(SQLException e){}
ResultSet rs=sql.executeQuery("select * from cc");
}
}
import java.sql.*;
public class Ss {
public static void main(String[] args) {
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");}
catch(ClassNotFoundException e){}
Connection con=DriverManager.getConnection("jdbc:odbc:ee");
try{Statement sql=con.createStatement();}
catch(SQLException e){}
ResultSet rs=sql.executeQuery("select * from cc");
}
}
嗯.这个问题很有深度,经过我代码粘贴和MyEclipse测试,终于知道什么问题了.主要是ResultSet rs=sql.executeQuery("select * from cc");中sql没有定义,因为sql在try,catch范围内,需要把这条与句改为:
try{
Connection con=DriverManager.getConnection("jdbc:odbc:ee");
Statement sql=con.createStatement();
ResultSet rs=sql.executeQuery("select * from cc");}
catch(SQLException e){
}
try{
Connection con=DriverManager.getConnection("jdbc:odbc:ee");
Statement sql=con.createStatement();
ResultSet rs=sql.executeQuery("select * from cc");}
catch(SQLException e){
}
R.id cannot be resolved
cannot be resolved什么意识
java错误i cannot be resolved
ActionListenter cannot be resolved to a type
javax.servlet.jsp.JspException cannot be resolved to a type
JAVA中报错i cannot be resolved to a variable
The type javax.servlet.ServletContext cannot be resolved.It
The remote name could not be resolved: 'platform.怎么解决?
be resolved to是什么意思及反义词
英语翻译: 请问您:resolved, 在合同中,放在句首:RESOLVED,通常应该怎么翻译?
英语翻译Cannot touch,Cannot hold,Cannot be together Cannot love,
英语翻译RESOLVED,that theBank be and hereby is authorized,withou