Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 84015 invoked from network); 11 Jan 2006 16:47:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Jan 2006 16:47:31 -0000 Received: (qmail 4214 invoked by uid 500); 11 Jan 2006 16:47:23 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 4195 invoked by uid 500); 11 Jan 2006 16:47:23 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 4182 invoked by uid 99); 11 Jan 2006 16:47:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jan 2006 08:47:22 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [204.136.66.108] (HELO dfwmail001.pbsg.com) (204.136.66.108) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jan 2006 08:47:21 -0800 Received: from ([156.81.226.26]) by dfwmail001.pbsg.com with ESMTP id KP-BRABD.48995291; Wed, 11 Jan 2006 10:46:13 -0600 Received: from pepwmu00195.corp.pep.pvt ([157.146.10.203]) by pepwmr00009.corp.pep.pvt with Microsoft SMTPSVC(6.0.3790.211); Wed, 11 Jan 2006 10:46:18 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: dynamic sql map Date: Wed, 11 Jan 2006 11:46:15 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: dynamic sql map thread-index: AcYWykrV2T3xe4bKSnqC6GoIrS7fPQAA+cfA From: "Voorhoeve, Niels {PBG}" To: X-OriginalArrivalTime: 11 Jan 2006 16:46:18.0976 (UTC) FILETIME=[8BB75600:01C616CE] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N If you're asking the db server to create a prepared statement or stored procedure with column names or table names as params, then it may not work (definitely not in the case of table names). I tried that with oracle once to no avail.=20 -----Original Message----- From: Henry Lu [mailto:zhlu@umich.edu]=20 Sent: Wednesday, January 11, 2006 11:15 AM To: user-java@ibatis.apache.org Subject: dynamic sql map I got errors: org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in=20 task 'SqlMapClient operation'; nested exception is=20 com.ibatis.common.jdbc.exception.NestedSQLException: --- The error=20 occurred in edu/umich/med/umms/coreyp/dao/ibatis_map/misc.xml. --- The=20 error occurred while applying a parameter map. --- Check the=20 select_list-InlineParameterMap. --- Check the statement (query failed).=20 --- Cause: java.sql.SQLException: ORA-00942: table or view does not exist org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator with the sql: select $col_code$ as m_name, $col_descr$ as m_value FROM $my_table_name$ and java code: Map map =3D new HashMap(4); map.put("col_code", "STATE_ABBRV"); map.put("col_descr", "STATE"); map.put("my_table_name", "USSTATE_DESC"); map.put("where_order_str", "ORDER BY STATE"); =20 return getSqlMapClientTemplate().queryForList( "select_list", map); Is there anyone can help me out this? -Henry Larry Meadors wrote: >Vector myVector =3D new Vector(theList); > >Larry > >On 1/11/06, Ashish Kulkarni wrote: > =20 > >>Hi >>I have defined a query as >> >> >>and in my java code i do >>List list =3D client.queryForList("selectLinesFromView", >>"ABC"); >> >>Suppose if i want a Vector as output, i just cannot >>parse it as it gives me classcastexception, >>so what is a best way of getting Vector as output, or >>do i have to iterate through list and uild my own >>vector >> >> >>Ashish >> >> >> >>A$HI$H >> >>__________________________________________________ >>Do You Yahoo!? >>Tired of spam? Yahoo! Mail has the best spam protection around >>http://mail.yahoo.com >> >> =20 >> > > > =20 >