cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Query Sql Control does not works

Hi All,

         I am using a query sql control in my workflow to save data to an external database. I checked with the connection and execute query with some direct data. It inserts perfectly. But when i give the Item parameters or workflow parameters it does not inserts. The workflow completes successfully all the steps. Data is not getting inserted.

attached my configuration screen of query sql.

Please Help me 

Thanks

0 Kudos
Reply
8 Replies
Workflow Hero

Re: Query Sql Control does not works

Hello,


If you turn on error handling within the action by logging out any error, do you get anything that is going unnoticed?  

Accept as Solution Reply
Workflow Hero

Re: Query Sql Control does not works

I am getting the error Incorrect syntax near 'sql'.

insert into Requests.dbo.Req(ReqNo,Title) values ({ItemProperty:Title},{ItemProperty:Request_x0020_No})

This is my query, is there any mistake in this query?

Please help me.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Query Sql Control does not works

don't you have swapped columns? they doesn't seems to follow naming of table columns. you might hit incorrect datatypes problem.

Accept as Solution Reply
Workflow Hero

Re: Query Sql Control does not works

Yes that mistake I noticed and changed.

Now i am trying to insert only one column 

insert into Requests.dbo.Req(Title) values({ItemProperty:Title});

but here i am getting an invalid column 'Test Title' error.

'Test Title' is the Title name entered from form.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Query Sql Control does not works

I would say apostrophes are missing

insert into Requests.dbo.Req(Title) values("{ItemProperty:Title}");

Accept as Solution Reply
Workflow Hero

Re: Query Sql Control does not works

Yes. Its Missing Single Quotes not double quotes. Thanks for the clue

Accept as Solution Reply
Workflow Hero

Re: Query Sql Control does not works

This is what I would've suggested, but you guys beat me to it.  Good work.

Accept as Solution Reply
Workflow Hero

Re: Query Sql Control does not works

Glad you solved the issue, can you please mark the answer you found most useful in helping you solve this issue correct.

Accept as Solution Reply