Hi again,
when watching the jdbc-trace, and checking for the code, it turns out,
that the problem is not in the statement, it is with the getString
procedures:
JDBC trace:
com.sap.dbtech.jdbc.exceptions.InvalidColumnException: nullInvalid
column CENTER_GUID.
at
com.sap.dbtech.jdbc.ResultSetSapDB.findColumnInfo(ResultSetSapDB.java:2751)
at
com.sap.dbtech.jdbc.ResultSetSapDB.getString(ResultSetSapDB.java:1243)
The code that uses getString for this column is:
if ( ((String)typeMap.get( (String)selectIDs.get(i) )).equals("String")
) {
resultMap.put( (String)selectIDs.get(i) , rs.getString(
(String)fieldMap.get( (String)selectIDs.get(i) ) ) ) ;
}
selectIDs holds IDs for the fields used in the database, fieldMap is a
HashMap, mapping the IDs used in the application (xml-files) to the real
database column names.
However, the CENTER_GUID column does really exist.
Regards,
Dominic
On Fri, 2003-06-06 at 09:31, Schroeder, Alexander wrote:
> Hi Dominic,
>
> can you please provide the complete exception (and if possible, a JDBC
> trace would be handy).
>
> Thanks
> Alexander Schr�der
> SAP DB, SAP Labs Berlin
>
>
> > -----Original Message-----
> > From: Dominic Veit [mailto:[EMAIL PROTECTED]
> > Sent: Friday, June 06, 2003 10:22 AM
> > To: [EMAIL PROTECTED]
> > Subject: JDBC: Invalid Column - but column exists
> >
> >
> > Hi all,
> >
> > I try to execute a SELECT statement from within JBOSS (Linux). The
> > statement is totally simple:
> >
> > SELECT SOMECOLUMN FROM TABLENAME WHERE COLUMN_1='Value1' AND
> > COLUMN_2='Value2' AND COLUMN_3='Value3'
> >
> > Value 1 is VARCHAR, 2 is DATE and 3 is TIME .
> >
> > If I execute it from DBVisualizer, it is no problem. If I execute it
> > just by handing it over to executeQuery, the above exception is being
> > thrown.
> >
> > Has anybody a clue what's happening there? Even if DBVisualizer works
> > with prepared statements, I cannot figure out what's
> > happening there and
> > why it does not work with executeQuery.
> >
> > Regards,
> >
> > Dominic
> >
> > --
> > Dominic Veit (Software Developer)
> > Medical Center, University of Freiburg
> > Dept. of Rheumatology and Clin. Immunology
> > Hugstetterstr. 55
> > 79106 Freiburg (Germany)
> > Tel.: 0761 270 37 84
> > Pager: 0168 73 22 60 0
> > E-mail: [EMAIL PROTECTED]
> >
> > _______________________________________________
> > sapdb.general mailing list
> > [EMAIL PROTECTED]
> > http://listserv.sap.com/mailman/listinfo/sapdb.general
> >
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general
--
Dominic Veit (Software Developer)
Medical Center, University of Freiburg
Dept. of Rheumatology and Clin. Immunology
Hugstetterstr. 55
79106 Freiburg (Germany)
Tel.: 0761 270 37 84
Pager: 0168 73 22 60 0
E-mail: [EMAIL PROTECTED]
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general