The variable name '...' has already been declared

  • 30 May 2009
  • 0 replies
  • 11 views

Badge +2

Hi,


 I have a composite smartobject which has a single method to read data from multiple smartobjects. I have been using this one method throughout my workflow and in my ASP.Net web pages to return data and determine activity destinations depending on paramaters passed to this method.


 The error is:


The variable name '@value212' has already been declared. Variable names must be unique within a query batch or stored procedure.


On testing, I have found that it does not always work and fails on one of my activities. On running a SQL trace, I found that the sql statement that is executed has a duplicate variable (as expected from the error) and there is nothing I can do about it as all the parameters I pass to the List method are required.


 I picked up this error once before when I had duplicate fields in other instances of composite smartobjects and I thought that was why it was failing but now when I run the List method without any parameters, it works correctly and returns all the data. When I pass certain parameters, it fails.


I think that the code that generates the parameters is based on the individual smartobjects and not on the entire composite object as a whole.


I have logged this problem with K2 but are there any fixes for this issue as yet?


Mike


0 replies

Be the first to reply!

Reply