mysql - Mule parameters in SQL queries -
i'm trying query 2 databases f102
mysql , f100
sql server.
the query mysql server works sql server connector doesn't "#[header:inbound:company] company" , throws:
root exception stack trace:
java.sql.sqlexception: many parameters: expected 0, given 1
@ org.apache.commons.dbutils.queryrunner.fillstatement(queryrunner.java:176)
@ org.apache.commons.dbutils.queryrunner.query(queryrunner.java:392)
@ org.mule.transport.jdbc.sqlstrategy.selectsqlstatementstrategy.executestatement(selectsqlst atementstrategy.java:80)
+ 3 more (set debug level logging or '-dmule.verbose.exceptions=true' everything)
is there differences between calling mysql , sql server when comes invoke variables , parameters in query?
<jdbc:connector name="db_conn_f102" datasource-ref="f102" pollingfrequency="5000" doc:name="database" validateconnections="false"> <jdbc:query key="read" value="select id , #[header:inbound:company] company actr"/> </jdbc:connector> <jdbc:connector name="db_conn_f100" datasource-ref="f100" pollingfrequency="5000" doc:name="database" validateconnections="false"> <jdbc:query key="readickr" value="select id, #[header:inbound:company] company actr"/> </jdbc:connector>
there's no difference in variable resolution in queries far database type concerned.
i reckon issue generate sql query not syntactically correct sql server. like: legal use bound variable in select
part of query sql server?
Comments
Post a Comment