/*## loading a connector */
Connection connection;
Statement statement;
ResultSet rs;
try{
Class.forName(jdbc_driver_name).newInstance();
} catch(InstantiationException e){
logger.info("<error type=\""+e.toString()+"\"
discription=\""+e.getMessage()+"\" />");
return null;
} catch(ClassNotFoundException e){
logger.info("<error type=\""+e.toString()+"\"
discription=\""+e.getMessage()+"\" />");
return null;
} catch(IllegalAccessException e){
logger.info("<error type=\""+e.toString()+"\"
discription=\""+e.getMessage()+"\" />");
return null;
}
/*## connect to database */
try{
connection DriverManager.getConnection(dblink_2_ss_database, login2db, pass2db);
} catch(SQLException e){
logger.info("<error type=\""+e.toString()+"\"
discription=\""+e.getMessage()+"\" />");
return "<error type=\""+e.toString()+"\"
discription=\""+e.getMessage()+"\" />";
}
/*## connect to database */
String dkstr;
try{
statement = connection.createStatement();
rs = statement.executeQuery("select q.arendator,q.no_dog,
q.address,q.date_begin, q.date_end, q.position_fc, q.telephone_fc from
arenda.vdog_ar q where sysdate between q.date_begin and q.date_end");
rs2xml j = new rs2xml();
j.setWithoutMDFlag(true);
dkstr = j.writeXML(rs);
statement.close();
connection.close();
} catch(SQLException e){
logger.info("<error type=\""+e.toString()+"\"
discription=\""+e.getMessage()+"\" />");
return "<error type=\""+e.toString()+"\"
discription=\""+e.getMessage()+"\" />";
}
return dkstr;
// it's me code!
there is a good book ... John Wiley & Sons - MySQL and Java Developer's
Guide or O'Reilly Java Programming with Oracle JDBC. I dont remember
where I've downloaded it. but I think you can find they here
(ebiku.powernews.ru)
r_stringer66@yahoo.com =BF=D1():
> Hi all,
>
[quoted text clipped - 10 lines]
> Thanks,
> Rob