RE: Re: Question about queryForList and Oracle ref cursors

2008-03-11 Thread Jesse Reimann
M To: user-java@ibatis.apache.org Subject: Re: Re: Question about queryForList and Oracle ref cursors queryForList only works for things that return result sets. Oracle ref cursors are a "sort of" result set, but the ref cursor is a parameter to a callable statement, rather than being returned f

RE: Re: Question about queryForList and Oracle ref cursors

2008-03-10 Thread Jason Bennett
user-java@ibatis.apache.org Subject: Re: Re: Question about queryForList and Oracle ref cursors Jason, This is what you will have to do, 1. Map an object to the columns being returned from the cursor in your sq-map-config file. i.e you should have an entry like this 2. You would h

Re: Re: Question about queryForList and Oracle ref cursors

2008-03-10 Thread Sundar Sankar
ssing > parameters to the SP force me to use the update() method? > > > > jason > > > -- > > *From:* Ryan Shelley [mailto:[EMAIL PROTECTED] > *Sent:* Monday, March 10, 2008 2:38 PM > *To:* user-java@ibatis.apache.org

Re: Re: Question about queryForList and Oracle ref cursors

2008-03-10 Thread Jeff Butler
gt; parameters to the SP force me to use the update() method? > > > > jason > > > -- > > *From:* Ryan Shelley [mailto:[EMAIL PROTECTED] > *Sent:* Monday, March 10, 2008 2:38 PM > *To:* user-java@ibatis.apache.org &g

RE: Re: Question about queryForList and Oracle ref cursors

2008-03-10 Thread Jason Bennett
to the SP force me to use the update() method? jason From: Ryan Shelley [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2008 2:38 PM To: user-java@ibatis.apache.org Subject: Re: Re: Question about queryForList and Oracle ref

RE: Re: Question about queryForList and Oracle ref cursors

2008-03-10 Thread Sundar Sankaranarayanan
nce or the ibatis document pdf's Regards Sundar From: Jesse Reimann [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2008 2:51 PM To: user-java@ibatis.apache.org Subject: Re: Re: Question about queryForList and Oracle ref cursors Ryan I guess you didn

Re: Re: Question about queryForList and Oracle ref cursors

2008-03-10 Thread Jesse Reimann
Ryan I guess you didn't read my original post. I tried both the Hashmap method of queryForList and the way you suggested. The only way I can actually get a populated List back is using the HashMap. If I do it this way : return getSqlMapClientTemplate().queryForList("TEST_TESTPROC.GET_CDDRPT");

Re: Re: Question about queryForList and Oracle ref cursors

2008-03-10 Thread Ryan Shelley
For reference: http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+call+a+stored+procedure Under: What SqlMapClient Method Should I Use? ... If your procedure returns a result set (not a result set in an OUT parameter, but a result set from the procedure itself), then use * que

Re: Re: Question about queryForList and Oracle ref cursors

2008-03-10 Thread Ryan Shelley
In the one you had, you were creating an empty HashMap, executing the queryForList method passing in the empty HashMap, and then converting the still empty HashMap to a list and returning that to your method. queryForList doesn't take an object parameter to store the results in, it takes an object

RE: Re: Question about queryForList and Oracle ref cursors

2008-03-10 Thread Jesse Reimann
Ryan that's exactly what I did that wouldn't work. It returns to me a List that has 10 elements all which are NULL. Jesse

Re: Question about queryForList and Oracle ref cursors

2008-03-10 Thread Ryan Shelley
Try: *public* List selectCDDRpt() { return getSqlMapClientTemplate().queryForList("TEST_TESTPROC.GET_CDDRPT"); } You're returning a list of rows, no extra work is required. Use the Hashmap if you need to pass values INTO the stored procedure. -Ryan On Mon, Mar 10, 2008 at 1:43 PM, Jesse Rei