/**************2004-04-21**************from wj*/
/*****oracle数据库接口***********/
package CMCC;
import java.sql.*;
import java.util.*;
import java.text.*;
import java.io.*;
import oracle.jdbc.driver.*;
public class jdbc_oracle_test
{
/*
public static void main( String args[] ){
jdbc_oracle db = new jdbc_oracle();
String Str;
int id;
ResultSet re = null;
re = db.query("select * from test");
try{
int i=0;
while(re.next() && i<10){
Str = re.getString("id");
System.out.println(Str);
i++;
}
}
catch(Exception e){
System.out.println("error!");
}
db.closestmt();
db.closeconn();
}
//*/
//String conn_str="jdbc:microsoft:sqlserver://127.0.0.1;DatabaseName=test";//---------数据库
String conn_str="jdbc:oracle:thin:@127.0.0.1:1521:test";
String username="test";//---------------数据库用户名
String password="test";//-------------数据库密码
private Connection conn=null;
private Statement stmt=null;
ResultSet rs=null;
//----------------------数据库链接----------------
public jdbc_oracle_test()
{
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
}
catch(java.lang.ClassNotFoundException e) {System.err.println("dbclass():"+e.getMessage());}
try
{






