|
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. -- [ Picked text/plain from multipart/alternative ] I don't know if it can help, but we use the IBM Data Access Beans functionnalities. In the metadata we declare the SQL Type (e.g DECIMAL) and the java type we want it to be returned by the resultset (e.g: java.Long) and the data access bean do the transformation itself. In this case we can use any kind of java type (Long, Integer, String ...) Here is an example for inputting parameters ("WEBID", Long.class, java.sql.Types.DECIMAL, StatementMetaData.PARM_MODE_INPUT) Where we say that the data access bean will receive a Long and it has to be transformed to SQL DECIMAL) This another example describe a column of the result set: AGENCYCODE", Long.class, java.sql.Types.DECIMAL) Where the field named AGENCYCODE is of type DECIMAL, but we ask the data access bean to transform it to a long when it is accessed. Cheers Gilles -----Original Message----- From: Hatzenbeler, Tim [mailto:thatzenbeler@clinitech.net] Sent: jeudi, 21. mars 2002 19:18 To: 'java400-l@midrange.com' Subject: Bigdecimal, result set question This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. -- [ Picked text/plain from multipart/alternative ] What object should I use in place of BigDecimal, since the compiler says it's being deprecated? ... I know I can turn the warning off, but I figure there must be a better object for decimal (business) precision, if there removing the object... Also, when I retrieve a result set, how do I determine, its was defined on the as/400 as a character or number, before I read the column. I'm trying to populate a spread sheet and want my program to work no matter what table there reading, so I didn't want to hard code the column values... Thanks, tim _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l or email: JAVA400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l. ********************************************************************** This E-mail and any files transmitted with it are confidential and intended for the exclusive use of the addressee(s) only. You should not disclose its contents to any other person. If you are not the intended recipient please notify the sender immediately. **********************************************************************
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.