B
billrobin
Unregistered / Unconfirmed
GUEST, unregistred user!
出错信息:
500 Servlet Exception
C:/resin-3.0.0-beta/MaterialOffice/WEB-INF/DataBase/DBConnection/DBConnection.java:5:
class DBConnManage is public, should be declared in a file named DBConnManage.java
public class DBConnManage
^
C:/resin-3.0.0-beta/MaterialOffice/WEB-INF/DataBase/DBConnection/DBConnection.java:9:
cannot resolve symbol
symbol : class Resultset
location: class DBConnection.DBConnManage
Resultset rs=null;
^
2 errors
源代码:
package DBConnection;
import java.sql.*;
import java.util.*;
public class DBConnManage
{
Connection conn=null;
Statement stmt=null;
Resultset rs=null;
String DBdriver="oracle.jdbc.driver.OracleDriver";
String DBLocation="jdbcracle:thinlocalhost:1521:CQMIS";
String DBUserID="cqsiyo";
String DBPasswd="robinsoft";
//构造函数。
public Statement ConnectionORADB()
{
try
{
Class.forName(DBdriver);
conn=DriverManager.getConnection(DBLocation,DBUserID,DBPasswd);
stmt=conn.createStatement();
}
catch(SQLException e)
{
System.err.println("DataBase Error:"+e.getMessage());
}
}
}
那位兄弟帮我看看,我最近对JAVA热情很高,正在努力学习,谢谢!!!
500 Servlet Exception
C:/resin-3.0.0-beta/MaterialOffice/WEB-INF/DataBase/DBConnection/DBConnection.java:5:
class DBConnManage is public, should be declared in a file named DBConnManage.java
public class DBConnManage
^
C:/resin-3.0.0-beta/MaterialOffice/WEB-INF/DataBase/DBConnection/DBConnection.java:9:
cannot resolve symbol
symbol : class Resultset
location: class DBConnection.DBConnManage
Resultset rs=null;
^
2 errors
源代码:
package DBConnection;
import java.sql.*;
import java.util.*;
public class DBConnManage
{
Connection conn=null;
Statement stmt=null;
Resultset rs=null;
String DBdriver="oracle.jdbc.driver.OracleDriver";
String DBLocation="jdbcracle:thinlocalhost:1521:CQMIS";
String DBUserID="cqsiyo";
String DBPasswd="robinsoft";
//构造函数。
public Statement ConnectionORADB()
{
try
{
Class.forName(DBdriver);
conn=DriverManager.getConnection(DBLocation,DBUserID,DBPasswd);
stmt=conn.createStatement();
}
catch(SQLException e)
{
System.err.println("DataBase Error:"+e.getMessage());
}
}
}
那位兄弟帮我看看,我最近对JAVA热情很高,正在努力学习,谢谢!!!