Dynamic ProDataSets and Parameters

Posted by ericg on 24-Jul-2009 17:49

Hi there. I would like to create and fill a dynamic PDS and then pass its contents and definitions to a .NET client.

I have something like this:

DEFINE VARIABLE hBanking AS HANDLE NO-UNDO.

RUN DynamicDataSet(..., OUTPUT DATASET-HANDLE hBanking).

But how do I set the hBanking to the pdsBanking below?

DEFINE INPUT-OUTPUT PARAMETER DATASET FOR pdsBanking.

Thanks for any help.

All Replies

Posted by Håvard Danielsen on 24-Jul-2009 18:04

The syntax for a dynamic reference is dataset-handle also for the parameter definition:

define input-output parameter dataset-handle pdsBanking.
run DynamicDataSet  (output dataset-handle pdsBanking).

Posted by Admin on 25-Jul-2009 14:35

In the RUN statement:

RUN DynamicDataSet(..., OUTPUT DATASET pdsBanking) .

The AVM will check the schema at runtime. The schema of the dynamic dataset and pdsBanking must match!

Posted by ericg on 27-Jul-2009 11:02

Thanks for the comments. When I use the DLL Proxy Generator, for procedures that use dynamic datasets, the .NET developers do not see the schema of the dataset during design time, therefore they cannot design bind to controls but have to programmatically do it. Therefore I think I will have to use static datasets.

Posted by Admin on 27-Jul-2009 11:32

Your initial question was:

But how do I set the hBanking to the pdsBanking below?

DEFINE INPUT-OUTPUT PARAMETER DATASET FOR pdsBanking.

You need a (three line) interface procedure.

DEFINE DATASET pdsBanking .....

DEFINE OUTPUT PARAMETER DATASET FOR pdsBanking.

RUN DynamicDataSet(..., OUTPUT DATASETpdsBanking).

You add this procedure to the Proxy. And that will do the automatic transmission from the dynamic dataset or the static dataset. IF the schema does match!
In your procedure DynamicDataSet you
DEFINE OUTPUT PARAMETER DATASET-HANDLE hDynDataset.

This thread is closed