Home » Fusion Middleware & Colab Suite » Weblogic & Application Server » trouble with oracle.xml.sql.* package
trouble with oracle.xml.sql.* package [message #76489] Mon, 09 September 2002 12:20 Go to next message
boil35
Messages: 5
Registered: August 2002
Junior Member
hi
I found this program on the oracle site , when i try it , i get this message the package oracle.xml.sql.query.OracleXMLQuery; does not exist but i configure the xdk normally
help me !!!

Import oracle.jdbc.driver.*;
import oracle.xml.sql.query.OracleXMLQuery;
import java.lang.*;
import java.sql.*;

// class to test the String generation!
class testXMLSQL {

public static void main(String[[]] argv)
{

try{
// create the connection
Connection conn = getConnection("scott","tiger");

// Create the query class.
OracleXMLQuery qry = new OracleXMLQuery(conn, "select * from emp");

// Get the XML string
String str = qry.getXMLString();

// Print the XML output
System.out.println(" The XML output is:n"+str);
// Always close the query to get rid of any resources..
qry.close();
}catch(SQLException e){
System.out.println(e.toString());
}
}

// Get the connection given the user name and password..!
private static Connection getConnection(String username, String password)
throws SQLException
{
// register the JDBC driver..
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

// Create the connection using the OCI8 driver
Connection conn =
DriverManager.getConnection("jdbc:oracle:oci8:@",username,password);

return conn;
}
}
Re: trouble with oracle.xml.sql.* package [message #76613 is a reply to message #76489] Wed, 12 February 2003 05:36 Go to previous message
JPV
Messages: 2
Registered: February 2003
Junior Member
The ClassPath must be initialized like this :

ClassPath=D:oracleora81jdbclibclasses12.zip;
D:oracleora81jdbclibnls_charset12.zip;
D:oracleora81rdbmsjlibxsu12.jar;
D:oracleora81libxmlparserv2.jar;
Previous Topic: Re: ORACLE CERTIFIED PROFESSIONAL TEST EXAM
Next Topic: Oracle 9i AS HTTP server problem !!!!!!!! urgent Plz.
Goto Forum:
  


Current Time: Thu Mar 28 10:09:36 CDT 2024