[
https://issues.apache.org/jira/browse/CAMEL-6091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13745044#comment-13745044
]
Claus Ibsen commented on CAMEL-6091:
------------------------------------
Thanks for the patch. Feel free to add this new option to the docs at:
http://camel.apache.org/sql-component
I have merged this fix to the 2.11 branch as well, so its included from
2.11.2/2.12 onwards.
> Improvement to SqlProducer class
> --------------------------------
>
> Key: CAMEL-6091
> URL: https://issues.apache.org/jira/browse/CAMEL-6091
> Project: Camel
> Issue Type: Improvement
> Components: camel-sql
> Affects Versions: 2.10.3
> Reporter: Chris Miles
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: Future
>
> Attachments: CAMEL-6091.patch
>
>
> I have came across a bug with the Microsoft SQL Server driver (4.0) in where
> the folowing line is problematic:
> int expected = ps.getParameterMetaData().getParameterCount();
> If I run the following query through the component:
> INSERT INTO [NEW_TABLE] SELECT * FROM [OLD_TABLE] WHERE ID = #
> expected is set to 0 which results in my value not being set.
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The value is not
> set for the parameter number 1.
> While this is a SQL Server issue, unfortunately the source is not available
> and an update is not likely any time soon to return the correct meta data. It
> would be handy if this Producer put the query preperation a little more into
> the hands of the user. I.e. let me say there are 5 parameters to be prepared
> along with the 5 values to use.
> If the user has manually put 5 items in a Map in the body, then can we not
> just use the map length to identify how many values and then iterate them.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira