db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saleem Edah-Tally <nm...@netcourrier.com>
Subject Import fails
Date Sat, 01 Sep 2007 21:04:53 GMT
Hello,

I used to import data with CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE procedure with 
success in JAVA.

The following doesn't work any more : 

CALL 
SYSCS_UTIL.SYSCS_IMPORT_TABLE('NMSET', 'PAYS', '/home/user/tmp/jbb/lst_pays.csv', 
null, null, null, 1)

The error message is : 
The exception 'java.sql.SQLException: No current connection.' was thrown while 
evaluating an expression.

I'm sure there is a connection, the same which created the statement : 

    protected boolean importTableDataCOUNTRIES() {
        try {
            java.sql.Statement st = 
conn.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, 
java.sql.ResultSet.CONCUR_UPDATABLE);
            String sql = "";

            sql = "CALL 
SYSCS_UTIL.SYSCS_IMPORT_TABLE('NMSET', 'PAYS', '/home/user/tmp/jbb/lst_pays.csv', 
null, null, null, 1)";
            st.executeUpdate(sql);
            
            return true;
        } catch (SQLException ex) {
            debug(ex.getMessage());
        }
        return false;
    }

The database is not being accessed by another application. The table does 
exist. The CSV file is comma separated and strings are enclosed by ".

Any clue how to resolve it ?

Thank you.


*******************************************
Support fight against software patents : 
http://noepatents.org/
*******************************************
Free your files : Visit OpenOffice.org
-------------------------------------------
NO FORCED SOFTWARE SALE
http://www.racketiciel.info/
*******************************************

Mime
View raw message