You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/08/20 17:16:52 UTC

[jira] [Assigned] (CAMEL-6091) Improvement to SqlProducer class

     [ https://issues.apache.org/jira/browse/CAMEL-6091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-6091:
----------------------------------

    Assignee: Claus Ibsen
    
> 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