try
{
// Create a DriverManager.
DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
// Create a connection to the Oracle Database instance.
OracleConnection o_connection =
(OracleConnection)DriverManager.getConnection("jdbc:oracle:thin:@" +
connection, user, password);
// Get information from the olapsys.xml_load_log table.
String result = null;
String sqlText = "select distinct xml_loadid " +
"from olapsys.xml_load_log " +
"order by xml_loadid desc";
Statement sqlStmt = o_connection.createStatement();
ResultSet rs = sqlStmt.executeQuery(sqlText);
if(rs.next())
{
// Get the first value.
int loadid = rs.getInt(1);