Example of using parameters for execute non-query


#1

Hi all,
can anyone please provide a working example of an execute non-query activity which uses parameters ? that is,
I am trying to use @ParameterName in my query. However, the query is not being substitued for the values as defined in my parameter list. What am I doing wrong ?
my query is something like update table Set fieldname=@ParameterName where fieldname=@parameterx
I am sure that the parameter has the correct value (used Log Message to check that).
The SQL statement which is being sent to the db does NOT substitue the @parameterName with the value.
help is much appreciated !!

Thanks


#2

anyone?


#3

Hi,

updateQuery = “update table set Approval=’”+approval_status.ToString.Trim+"’ where REFNO=’"+refNumber.ToString.Trim+"’"

Here ‘approval_status’ and ‘refNumber’ are the parameters (string variables in the workflow.)

Regards,
Shiju Mathew


#4

Thanks for reply. That is what I eventually had to do.
However, the documentation mentions the usage of the feature of providing Parameters, in the Collection parameters attribute of the activity. It mentions the use of parameters in the format of @ParameterName which is automatically substituted at run time.
I am looking for working examples of that


#5

I was not aware at all about the Parameters. My bad. I can see some topics on it in forum. I will read through and will try using that in my work flows. Thanks.


#6

anyone?


#7

hi all,
I wonder if anyone can tell me if this is a bug or the correct way of using parameters in a execute non-query activity? the documentation was clear and I followed it, the behavior is not as documented.
thank you!!