Workflow Soluiton

 View Only
  • 1.  Workflow SQL error

    Posted Jan 18, 2011 10:41 AM

    I'm working on a inherited workflow project and need to add fields to the database.  I've added the fields to the database and the stored procedure for the project however, when the project runs I get the following workflow error..

    "Procedure or function proc_Insert_StatusChange has too many arguments specified"

     

    My knowledge of SQL is limited so I'm not sure what this is telling me.  Any help would be appreciated.



  • 2.  RE: Workflow SQL error

    Posted Jan 18, 2011 11:14 AM

    You're trying to run a stored procedure with more arguments/parameters than it requires i.e. s_blah 'a', 'b', 'c' when it only takes 2 arguments.

    What I would first do is browse the stored proc in the database and see how many arguments it's SUPPOSED To take.

    Second, I'd try and find the component responsible for inputting the data. It's either a generated SQL component or one of the Logicbase.Components.SQL components probably being used. If it's generated, you may have to "regenerate" the component to clean out the extra parameters. If it's a LB.Comp.SQL component, you can edit the SQL in the component directly to clean out the additional paramters.



  • 3.  RE: Workflow SQL error

    Posted Jan 18, 2011 01:44 PM

    Thanks for the response.. I've looked at both the database and the stored proc.  They match perfectly.   I've also looked at the component and then closed and recompiled it a number of times but it's still giving me the same error.  I've also gone thru the fields in the component itself and set up all the fields again comparing them with the stored proc and the database... 

     

    When you say regenerate the component is that just recompiling the component or do I need to somehow delete the component and then create it from scratch?

     

    Thanks again for your assistance.



  • 4.  RE: Workflow SQL error

    Posted Jan 18, 2011 02:09 PM

    I'm sure you have already done this but after recompile the custom component, don't forget to do a 'reload' of the project



  • 5.  RE: Workflow SQL error

    Posted Jan 18, 2011 02:45 PM

    Have you verified that you're running against the correct database? This is usually defined as a connectionstring property in your component. There may be 2 different versions of the stored proc on different databases.

    Another thing to try is to run a trace against the database to see exactly what SQL is being executed by the component.

    If worse comes to worse, you can send me a .package and DB build script to richard_wright@symantec.com

    Basically, when you generate a SQL component, it will examine the database object and build the code/t-SQL such that it can operate with that object AT THAT POINT IN TIME. If the stored procedure, for example, gets renamed, loses parameters, gets new parameters, your component knows nothing about it. You "regenerate" the component to make it aware of these changes (basically, rebuild the component code). It doesn't delete the old component, just updates it.