Re: how to pass two different types of values to query in IBATIS

2010-04-14 Thread Ingmar Lötzsch
I prefer the use of java.sql.Array and a custom TypeHandler and to keep the sql as simple as possible. Here is an example for Ibatis 2. Create an IntArrayTypeHandler class and register it in the config. public class IntArrayTypeHandler implements TypeHandlerCallback { public void setParamete

Re: how to pass two different types of values to query in IBATIS

2010-04-13 Thread Nathan Maves
1/2010 3:41 PM, mukhi wrote: >>>>>> >>>>>>> >>>>>>> I am using Spring with Ibatis. I want to pass a sting value and list >>>>>>

Re: how to pass two different types of values to query in IBATIS

2010-04-13 Thread cowwoc
- To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org For additional commands, e-mail: user-java-h...@ibatis.apache.org -- View this message in context: http://old.nabble.com/how-to-pass-two-different-types-of-val

Re: how to pass two different types of values to query in IBATIS

2010-04-13 Thread mukhi
entryRefno#,CHOICE_REFNO, >>>>> FROM T_CHOICE >>>>> WHERE CHOICE_REFNO IN ( 90,89,93,45,67) >>>>> >>>>> >>>>> >>>>> in the above query

Re: how to pass two different types of values to query in IBATIS

2010-04-12 Thread Nate Weiss
On 4/12/2010 10:24 AM, mukhi wrote: Thanks, but the parameter 'entryrefno' is of numeric type in my table. How can i pass two different types of values to Map at the same time? Please reply me. I am struck at this point. If you added that numeric value to your map before you passed it in, li

Re: how to pass two different types of values to query in IBATIS

2010-04-12 Thread François Schiettecatte
There you go, much cleaner, thanks for correcting me, I had not used that particular functionality before. François On Apr 12, 2010, at 11:00 AM, Martin Ellis wrote: > 2010/4/12 François Schiettecatte : >> I think Mukhi is trying to pass a string and an array of numbers, the string >> being th

Re: how to pass two different types of values to query in IBATIS

2010-04-12 Thread Martin Ellis
2010/4/12 François Schiettecatte : > I think Mukhi is trying to pass a string and an array of numbers, the string > being the entryRefno and the list of nunbers to be added to the IN() clause > of the SELECT statement in the example given. > > The Map is the way to go, you just need to add the st

Re: how to pass two different types of values to query in IBATIS

2010-04-12 Thread François Schiettecatte
>>> >>>> >>>> >>>> in the above query i need to pass two types of parameters. >>>> 1. Sting >>>> 2.list of values in where clause. >>>> >>>> How can i do it? >>>> >>>> >>>

Re: how to pass two different types of values to query in IBATIS

2010-04-12 Thread Nathan Maves
es in where clause. >>> >>> How can i do it? >>> >>> >>> What kind of parameter I can pass to call the query. while making call >>> >>> getSqlMapClientTemplate().insert("insertChoice",  What parameter goes >>> here?);

Re: how to pass two different types of values to query in IBATIS

2010-04-12 Thread mukhi
call >> >> getSqlMapClientTemplate().insert("insertChoice", What parameter goes >> here?); > > > --------------------- > To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org > For additional com

Re: how to pass two different types of values to query in IBATIS

2010-04-11 Thread Nate Weiss
Hi mukhi-- I'm pretty new to this list, but I believe the general solution is to make a HashMap and pass that in: Map params = new HashMap(); params.entryRefno= myEntryRefno; params.someList = someList; getSqlMapClientTemplate().insert("insertChoice", params); In iBatis 3 you also have the op

how to pass two different types of values to query in IBATIS

2010-04-11 Thread mukhi
("insertChoice", What parameter goes here?); -- View this message in context: http://old.nabble.com/how-to-pass-two-different-types-of-values-to-query-in-IBATIS-tp28211187p28211187.html Sent from the iBATIS - User - Java mailing list archive at