Query Sql Control does not works

  • 20 February 2017
  • 8 replies
  • 26 views

Badge +4

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


8 replies

Userlevel 5
Badge +12

Hello,


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

Badge +4

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.

Userlevel 5
Badge +14

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

Badge +4

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.

Userlevel 5
Badge +14

I would say apostrophes are missing

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

Badge +4

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

Userlevel 5
Badge +12

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

Userlevel 5
Badge +12

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

Reply