Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
Hi , In execute process task am passing 2 variables under expression -> argument type as @var1+" "+@var2.

I received in console application as 

 string Region= args[0].ToString().Trim();
 string location= args[1].ToString().Trim();

If i used any Region or location in ado.net operations am receving like 

the name is "Region" not permitted in this context valid expressions are constants.


What I have tried:

C#
Hi , In execute process task am passing 2 variables under expression -> argument type as @var1+" "+@var2.

I received in console application as 

 string Region= args[0].ToString().Trim();
 string location= args[1].ToString().Trim();

If i used any Region or location in ado.net operations am receving like 

the name is "Region" not permitted in this context valid expressions are constants.
Posted
Comments
Patrice T 25-Mar-16 4:06am    
Can you show real piece of code ?
Vicky Siddharth 25-Mar-16 5:21am    
HI PPOLYMORPHE, i want to know whether the variable passing correct or not.if correct then capturing that variables in console application correct or not.. And add to that i am inserting table with the help of this variables . during that ado operations am facing above mentioned error.
CHill60 8-Apr-16 10:16am    
It is not the passing of the variables that is the problem it is how you are using them afterwards. We can't possibly help you without seeing that code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900