views:

117

answers:

1

The problem is: I'm setting a preparedStatement for a query in a table with this fields (among others):

TABLE1_RSPN NUMBER(8,0)
TABLE1_AFDV NUMBER(8,0)
TABLE1_VALUE    NUMBER(17,2)
TABLE1_NOTE VARCHAR2(255 BYTE)
TABLE1_USR  VARCHAR2(20 BYTE)

...

Trying to get some info into my Java app, I set a preparedStatement which raises the Oracle exception ORA-03115 unsupported network datatype or representation.

The relevant Java code is this:

sentSQL = "SELECT TABLE1.*, TABLE2.CIAS FROM TABLE1, TABLE2 WHERE TABLE1_RSPN = ?" +
" AND TABLE2_AFDV = TABLE1_AFDV";
ps = con.prepareStatement(sentSQL);
ps.setBigDecimal(1, dto.getCodResponsability());
rs = ps.executeQuery(sentSQL);

CodResponsability is BigDecimal. I've also tried with Double and Long, with no joy.

Thanks in advance for your help!

+3  A: 

This line is probably wrong:

rs = ps.executeQuery(sentSQL);

This actually calls Statement's executeQuery and ignores the variables you've bound.

It should be

rs = ps.executeQuery();
R. Bemrose
Thank you! No TV and no beer makes Alfabravo go crazy... and forget. :)
Alfabravo