Plex 2E

  • 1.  DELETE SQL EXEC

    Posted Sep 25, 2014 12:48 PM

    Hello all,

     

    I'm trying to create a new Server Function with a SQL EXEC statement to clean a SQL SERVER table.

     

    I get an erro when Generating & Building.

     

    Function definition

    1.jpg

    Source Code :

    2.jpg

     

    Calling the source code in the function :

    3.jpg

     

    Error gen&build :

    4.jpg

     

    C++ code :

    5.jpg



  • 2.  Re: DELETE SQL EXEC

    Posted Sep 25, 2014 04:56 PM

    My first guess would be that your function is neither scoped to nor "uses" a view.  One or the other is required with "exec sql".

     

    John



  • 3.  Re: DELETE SQL EXEC

    Posted Sep 26, 2014 02:58 AM

    Agree with John...A function with Exec SQL requires to be  scoped by a view.

    Jorge Ubeda



  • 4.  Re: DELETE SQL EXEC

    Posted Sep 26, 2014 08:47 AM

    Agree with John, A function with Exec SQL requires to be scoped by a view. However this should be warned with an error/warning message in the message log window while generating the code for that function, so that the Plex developer get to know at early stage than the build error where build errors confuses more.

     

    Best Regards,

    Mahadev Kanike

    Sr. Software Engineer

    CA Technologies