Apres modif :
import java.sql.*;
import java.io.*;
import oracle.xml.sql.query.*;
import oracle.xml.sql.OracleXMLSQLException;
import oracle.jdbc.driver.*;
public class clients_Public_essai
{
public static void main(String args[]) throws Exception
{
Class.forName("oracle.jdbc.driver.OracleDriver" );
Connection conn =
DriverManager.getConnection("jdbc:oracle:oci8:@DOM","user","Pass" );
File output= new File("C:\\output.txt" );
FileWriter writer = new FileWriter(output);
;
OracleXMLQuery qry = new OracleXMLQuery(conn, "select ct.cli_compte REFERENCE, ct.cli_codpost_soc CP, ct.cli_insee_soc INSEE, "
+ " ct.cli_adr1_soc || ' ' || ct.cli_adr2_soc || ' ' || ct.cli_adr3_soc ADRESSE, ct.cli_tel TEL, ct.cli_fax FAX, ct.cli_e_mail EMAIL_CONTACT, '0' ABONNEMENT "
+ " from client ct, charge_de ce, societe sct "
+ " where ct.cli_id = ce.cli_id and ce.soc_id = sct.soc_id and sct.soc_lbl = 'BAIL'" );
qry.setRowsetTag("liste_pro" ); // set the root document tag
qry.setRowTag("pro" );
try{
writer.write(qry.getXMLString());
writer.close();conn.close();
}
catch (OracleXMLSQLException e)
{
Exception parent = e.getParentException();
writer.write( e.getErrorCode() +e.getXMLSQLErrorString() + parent.toString());
}
}
}
Ce code passe très bien sur une autre machine que la mienne ??????
Or la mienne se connecte en sql+ à oracle sans problème!!
Et là, je sais pas quoi dire