Re: connection fails with sybase

2005-07-05 Thread Guido GarcĂ­a Bernardo
Is your driver in the classpath? Dropping the driver .jar file into your TOMCAT_HOME\common\lib directory should work fine... Regards Bertulu Gianluca wrote: Hi, I'm using ibatis 2.0 mith sybase ASE 12.5, but the connection fails with this message: Failed to queryForList - id [getModuli],

Inline parameter

2005-07-05 Thread Leon van Tegelen
Hi Is it possible to specify the MODE of a parameter (IN/OUT/INOUT) in an inline parameter ? Curently I'm using a parameter map as input for a stored procedure call, but I'd rather us a parameterClass. Thanks in advance Leon van Tegelen -- Leon van Tegelen Cumquat Information Technology

Re: How to use type handler callbacks inside quiries?

2005-07-05 Thread Daniel Henrique Ferreira e Silva
Hi Martin, Curiously this seems to not be well documented. At least, i couldn't find it in the DevGuide. You can do: #myProperty,handler=foo.bar.MyHandler# According to mailing list archives, that should work. Cheers, Daniel Silva. On 7/5/05, Zeltner Martin [EMAIL PROTECTED] wrote: Once

RE: How to use type handler callbacks inside quiries?

2005-07-05 Thread Jean-Francois Poilpret
Not sure I understand _exactly_ what you want, so just in case: Did you try typeHandler javaType=MyTpe callback=MyTypeHandler/ It works very well for me (as long as you have defined a TypeHandler for a specific class type of your own). It is documented in the wiki:

Re: Inline parameter

2005-07-05 Thread Larry Meadors
I believe you can do something like this: #parmName,mode=OUT,jdbcType=NUMERIC#, but IMO, the real question is why? Inline parameters are a great shortcut, but if you have already created a working parameter map, why mess around trying to make it work with an inline one when you lose both

Re: R: [HELP] Whether or not iBatis support SQL Injection?

2005-07-05 Thread Larry Meadors
Yes, it does pass the SQL directly to the driver, but unless you use the $$ syntax for parameters, you should be safe with iBATIS. The $$ syntax is the only part of iBATIS that allows string concatenation, which is the biggest source of SQL injection attacks. If you are using a really crappy

Re: [HELP] Whether or not iBatis support SQL Injection?

2005-07-05 Thread Brandon Goodin
If you are using the #myProperty# delimiters you need not worry about sql injection. If you use the $myProperty$ literals you would need to guard against sql injection on your own. Brandon. On 7/5/05, Pham Anh Tuan [EMAIL PROTECTED] wrote: Hi all, I don't know whether or not iBatis

Re: Advantage of Map over Bean as a parameterObject?

2005-07-05 Thread Brandon Goodin
okay, since everyone else is chiming in... I'll add to Tim's point. Even if you are using your returned data in a read only format you may also want to perform calculations on the results. With maps you cannot predict what type will be returned by the driver. This results in something like a

Re: Advantage of Map over Bean as a parameterObject?

2005-07-05 Thread Roberto R
Sortof on a tangent, but unfortunately reporting tools are usually created for handling generic collections that aren't tied to a specific domain model and for having calcs or other really intensive processes be handled by the db (unless it's a really simple calc or quick report). The dynamic

RE: Countng Rows - UPDATE

2005-07-05 Thread Folashade Adeyosoye
In the JAVA part I switched count = (Integer) queryForObject(searchCountAvatar, parameterObject); FOR count = (Integer) getObject(searchCountAvatar, parameterObject); Thanks all.. From: Clinton Begin [mailto:[EMAIL PROTECTED] Sent: Monday, July 04, 2005 12:37

Re: Advantage of Map over Bean as a parameterObject?

2005-07-05 Thread Jeff Butler
My 2 cents...your milage may vary. We use maps exclusively. I'm sure that custom beans perform better, but I doubt that would make any noticable difference to an end user - in my experience the real performance killers in web apps are network latency and having to use a low function, browser

Caused by: com.ibatis.sqlmap.client.SqlMapException: Unrecognized parameter mapping field

2005-07-05 Thread Ashish Kulkarni
Hi I am not sure why i am getting the above error, is there a way to debug it. I am going to paste my xml file definiation here, I am sure this SQL statement works the error i am getting is as below Caused by: com.ibatis.sqlmap.client.SqlMapException: Unrecognized parameter mapping field: '

Re: Caused by: com.ibatis.sqlmap.client.SqlMapException: Unrecognized parameter mapping field

2005-07-05 Thread Larry Meadors
Any fields with # in them need to be escaped with ## A.PCVER# AS PCVER, - should be - A.PCVER## AS PCVER, ..and... WHERE A.Pcpord = VALUE# - should be - WHERE A.Pcpord = #VALUE# What db is this? That is a freaky looking join with all the in there. Larry On

Multiple Database Best Practices

2005-07-05 Thread Mitchell, Steven C
Is there a recommended best practice for handling an application that connects to multiple databases? Is it as simple as maintaining multiple sets of dao.xml and sql-config.xml files?

Re: Multiple Database Best Practices

2005-07-05 Thread Clinton Begin
You're right about the multiple SqlMapConfig.xml files, but you need only one dao.xml file, as DAO supports multiple datasources. Cheers, Clinton On 7/5/05, Mitchell, Steven C [EMAIL PROTECTED] wrote: Is there a recommended best practice for handling an application thatconnects to multiple

Re: [HELP] Whether or not iBatis support SQL Injection?

2005-07-05 Thread Larry Meadors
When you use this: select id=good resultMap=myResultMap select * from foo where id = #value# /select ...and call it like this: MyBean b = (MyBean)sqlMap.queryForObject(good, new Integer(1)); ...iBATIS creates a prepared statement, so the SQL that goes to the database is: select * from foo