SP w/output parameter

Posts   
 
    
Wingnut
User
Posts: 8
Joined: 20-Apr-2005
# Posted on: 05-Oct-2005 03:09:20   

I am using the example provided in the on-line help to call an SP with two input and one output parameters as follows;

' [VB.NET] Dim outputValue as Integer Dim resultSet As DataTable = ActionProcedures.MyStoredProcedure(1, 2, ByRef outputValue)

with the SelfServicing adapter, VS.net doesn't like the ByRef value specificed. How can I retrieve the output values using an action SP with an output parameter?

Paul.Lewis
User
Posts: 147
Joined: 22-Aug-2005
# Posted on: 05-Oct-2005 04:47:50   

Wingnut wrote:

...with the SelfServicing adapter, VS.net doesn't like the ByRef value specificed.

What error is VS.NET giving you?

Wingnut
User
Posts: 8
Joined: 20-Apr-2005
# Posted on: 05-Oct-2005 04:54:04   

Expression Expected.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 05-Oct-2005 11:01:52   

Could be an error in the docs: leave the ByRef out of the call, so use the call: Dim outputValue as Integer Dim resultSet As DataTable = ActionProcedures.MyStoredProcedure(1, 2, outputValue)

The examples were obviously converted from C# to VB.NET, where ByRef is not required in the call when the signature of the method has a ByRef keyword. Where exactly was this example located (so I can fix it wink ) ?

Frans Bouma | Lead developer LLBLGen Pro
Wingnut
User
Posts: 8
Joined: 20-Apr-2005
# Posted on: 07-Oct-2005 00:10:41   

Works like a charm without the ByRef.

Documentation is "Using Generated Code" - "Self Servicing" - "Calling a Stored Procedure" - last code sample.

Thanks,

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 07-Oct-2005 10:36:55   

Thanks, fixed in next version's docs.

Frans Bouma | Lead developer LLBLGen Pro