Zdravim,
mam takovyto maly problemek
v jave vygeneruji celkem slozite nejaky dotaz a pote chci zavolat dotaz pres
iBatis, ktery mam nadefinovany jako
<select id="findCouplesByParameters" resultMap="coupleResultMap"
parameterClass="string">
#sqlQuery#
</select>
vysledek je takovy(dotaz jako takovy normalne projde, tady pro priklad je
zcela trivialni)
zrejme je problem pri vytvareni statementu primo v driveru, potreboval bych
mu nejak rict, aby zrovna tento parametr
bral jako obyc. text.
java.sql.PreparedStatement - {pstm-100001} PreparedStatement:
?
java.sql.PreparedStatement - {pstm-100001} Parameters: [SELECT * FROM
couples WHERE couples.id=1 AND couples.problemstatus='NO_PROBLEM']
java.sql.PreparedStatement - {pstm-100001} Types: [java.lang.String]
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the findCouplesByParameters-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: ERROR: syntax error at or near "$1"
Caused by: java.sql.SQLException: ERROR: syntax error at or near "$1"
diky za rady
Tomas
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.3/254 - Release Date: 8.2.2006