E:\oracle\app\oracle\product\10.2.0\server\BIN>net start OracleXETNSListener服务名无效
发布网友
发布时间:2022-05-16 05:19
我来回答
共2个回答
热心网友
时间:2023-10-12 07:43
1、分析系统需求、画出数据流图,完成数字字典定义工作
2、根据需求分析的结果对系统的数据进行抽象,设计各个局部E-R图和全局E-R图。
3、根据概念设计阶段产生的E-R图进行逻辑设计,写出数据库的逻辑报告
4、采用ORACLE数据库系统SQL语言完成建表工作。
热心网友
时间:2023-10-12 07:44
sid写错了,url中的JCMHHIS是sid,你的**是什么?
看看我的
import java.sql.*;
public class JDBConnection {
private final String dbDriver =
"oracle.jdbc.driver.OracleDriver";
private final String url =
"jdbc:oracle:thin:@10.10.40.2:1521:JCMHHIS";
private final String userName = "username";
private final String password = "password";
private Connection con = null;
public JDBConnection() {
try {
Class.forName(dbDriver).newInstance();
} catch (Exception ex) {
System.out.println("couldn't find driver");
}
}
public boolean creatConnection() {
try {
con = DriverManager.getConnection(url, userName, password);
con.setAutoCommit(true);
} catch (SQLException e) {
System.out.println(e.getMessage());
System.out.println("creatConnectionError!");
}
return true;
}
public boolean executeUpdate(String sql) {
if (con == null) {
creatConnection();
}
try {
Statement stmt = con.createStatement();
int iCount = stmt.executeUpdate(sql);
System.out.println("update" + String.valueOf(iCount));
return true;
} catch (SQLException e) {
System.out.println(e.getMessage());
System.out.println("executeUpdaterError!");
return false;
}
}
public ResultSet executeQuery(String sql) {
ResultSet rs;
try {
if (con == null) {
creatConnection();
}
Statement stmt = con.createStatement();
try {
rs = stmt.executeQuery(sql);
} catch (SQLException e) {
System.out.println(e.getMessage());
return null;
}
} catch (SQLException e) {
System.out.println(e.getMessage());
System.out.println("executeQueryError!");
return null;
}
return rs;
}
public void closeConnection() {
if (con != null) {
try {
con.close();
} catch (SQLException e) {
e.printStackTrace();
System.out.println("Failed to close connection!");
} finally {
con = null;
}
}
}
}
另外,站长团上有产品团购,便宜有保证