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.
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).
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!
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.
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).