[Opensource] setFieldsToRetrieve not working?

Malcolm Wise malcolm.wise at sde.eu.sony.com
Tue Sep 10 08:28:48 PDT 2002


Hi,

I am trying to retrieve just 2 columns from a row in a table, so I'm using
DBObject.setFieldsToRetrieve("PROJECT_ID|PROJECT_NAME").  I can see that the
SQL select statement is setup properly, but the retrieve() fails with an
exception:

com.jcorporate.expresso.core.controller.ControllerException:
(com.sony.sde.excalibur.dbobj.Project) Error retrieving field
'MANUFACTURER_ID' index 3:Error fetching string field 3:Last SQL was:SELECT
PROJECT_ID, PROJECT_NAME FROM PROJECT WHERE PROJECT_ID = 3
(com.sony.sde.excalibur.dbobj.Project):JZ008: Invalid column index value
3.:JZ008: Invalid column index value 3.

MANUFACTURER_ID is indeed a column in my table, but it seems that it's
trying to get the third column from the result set when there are only 2
specified in the SELECT.  If I remove the setFieldsToRetrieve() line then
the retrieve() works.
I am using Sybase ASE 12.0 and Expresso 4.1ea3.  Apologies if this has been
fixed in ea4!

Cheers,

Malcolm Wise
Technology Manager
Semiconductor & Devices Europe
Tel. +44(0)1256 388864
http://www.semiconductor.sony-europe.com



*************************************************************************
The information contained in this message or any of its
attachments may be privileged and confidential and intended 
for the exclusive use of the addressee. If you are not the
addressee any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited
*************************************************************************



More information about the Opensource mailing list