SQL Query/ Non-Query
I have a workflow that utilizes the SQL Query and Non-Query Activities in several places. I need to make this workflow more portable so I can use it with multiple sites. I tried creating a argument in the Query Parameters for the table_name I need to query and passing in the varible with the name. This would make it so i could set this different on every sit and still use the same workflow. I can't seem to get this to work, seems that bindvaribles can't be used for the table_name. Does anyone know of a way this will work and the syntax to do so or a better way of accomplishing this task?
Thanks,
Keith
-
Hi Keith
once way to tackle this is:
- use a stored procedure rather than a table query.
- the stored procedure would have a parameter that would be able to be altered for each time that the workflow by using an argument.
- use logic in the stored procedure to control the source of the data that is returned based on the input parameter
Let me know if you need further help with that.
Regards
Ralph Price
0 -
Ralph,
This is exactly what I am trying to accomplish. For now we have all our connection strings stored in the web config and have used a case statement to determine what town/city site the request is coming from and from there it determines in case statement which parallel sequence to use.
Instead of having multiple copies of the same sequence with only different sql connection strings, it would be great to have just one and be able to dynamically change the connection string like if it could be stored in a variable.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare