I have seen other posts about this but none of the suggestions have seemed to work. I have a workflow that I want to update records in a database based on the unique ID that it receives. I keep getting an error: "Conversion failed when converting the varchar value to data type int"
I attached my workflow query and test. Confirmed this works on the table SSMS directly.
I have also tried setting my @ID parameter to @? as instructed in another answer on here, but it yields the same result. I have also tried changing the parameter value to int16,32 and 64 with no luck.
Question
Question
Issues with update statement from Workflow
Answer
This is dependent on the driver, instead of @? try just ? in the query area as well as remove the single quotes. If you switch the driver to be direct and not be ODBC, it will likely work as well with current syntax.
This worked! But I'm confused as to why. I understand the driver thing but this scenario is working on another Workflow on the same server going to the same DB server (different database though).
But thank you. This at least gets me a move forward path!
Thank you, John and Miruna for your responses. I'm adding this final detail in case anyone else is researching this exact issue in the future.
I made a mistake when I created my data source connection from Workflow. I set it up as Sql (ODBC) vs Sql (Direct). Once I changed that, it worked as expected.
I think I was under the assumption that this would need to change on the server level. It's actually something I was able to resolve by configuring the data source properly in WF itself.
Adding screen shots for visibility.
Thanks again!