views:

22

answers:

2
+1  Q: 

AEP help needed...

Can the AEP Stored procedure functions have additional paramenters added?

A: 

If I understand what you are asking, the answer is yes. You can use the ALTER PROCEDURE statement to add a parameter to an existing AEP. For example,

ALTER PROCEDURE MyAEP ( 
      num Integer,
      newparam Integer
   ) 
   FUNCTION 
     "TestSP"
   IN COMLIBRARY 
     "AdvantageAEP1.aep_procedures";

You would also need to update the procedure itself to make use of the parameter.

As far as the function itself in the DLL or assembly, you cannot change the parameter list. The server expects a very specific prototype for the function.

Mark Wilkins
I was referring to the .Net Class function.
Howard
@Howard, I added a bit more info about that to the answer. You cannot change the function prototype. I'm curious, though. What parameters were you wanting to add?
Mark Wilkins
I am developing a Biztalk WCF Adapter and need to extract the metadata for the stored procs. The way the input and output parameters are stored in system.storedprocedures makes it very difficult to parse out the parameters. I need to generate schemas for the procs. The adapter is a Visual Studio add-in that generates runtime schemas and binding files for both Inbound and Outbound operations.
Howard
@Howard, I probably still don't understand since I don't understand how adding parameters to the actual AEP function would help. But maybe AdsCommand.DeriveParameters would help. It can extract that information from a stored procedure.
Mark Wilkins
A: 

Assuming you are wondering how to send parameters to the stored procedure and then read them, you create your function with as many parameters as you need. The .NET assembly that you build to be called when your execute the stored procedure gets very specific parameters itself (as was mentioned by Mark).
Your task is to use the connection that you are passed to open the __input table and read the parameter values that are stored there, and operate on them as you need to.
If you get the help file as of 9.1 (I believe) where all of the help is in one file, you will find Cary Jensen's book ALSO included, and he has a couple of sections in Chapter 7 on writing stored procedures using .NET via C# and VB.Net

Doug Johnson