eclipse里面连接oracle数据库总是报错
我在eclipse里面写了一个连接oracle数据库的测试jsp代码
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<jsp:useBean id="dbbean" class="database.DBBean" scope="page">
</jsp:useBean>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here </title>
</head>
<body>
<%
if (dbbean.DBCon()==null) {
out.println("Oracle Access Fail");
}
%>
</body>
</html>
用到的bean是DBcon.java
package database;
import java.sql.*;
public class DBBean {
private Connection con;
public Connection DBCon() {
String CLASSFORNAME="oracle.jdbc.driver.OracleDriver";
String SERVANDDB="jdbc:oracle:thin:@10.28.190.39:1521:orcl";
String USER="kjuser";
String PWD="bzxxzx";
try {
Class.forName(CLASSFORNAME);
相关问答:
<?php
getenv("ORACLE_HOME");
$conn=ocilogon("test","test","test_db");
if($conn)
echo success;
&nb ......
兄弟 图挂了。
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value ......
本来要写个update语句
update table_a A
set A.flag=1
where A.id in (select B.id from table_b B)
结果误写成
update table_a A
set A.flag=1
where ......
exp user/password@dbname file=c:\table.dmp tables=jbitaku,jbitakum grants=y
然後按回車鍵 說明: user/password@dbname 分別表示用戶名,密碼和服務名 f ......