Java OpenClient and dynamic Temp Tables

chadj

New Member
Hello,
I have a question concerning how to interact with dynamic temp-tables via the Java OpenClient through an Application Server. From what I'm reading in the Open Client docs I need a temp table defined with a BEFORE-TABLE to be able to add / modify / delete records via Java. Unfortunately I'm using a dynamic temp table (CREATE TEMP-TABLE) who's definition looks like :

Code:
DEFINE INPUT PARAMETER pcTableName AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER pcTempTableName AS CHARACTER NO-UNDO.
DEFINE OUTPUT PARAMETER TABLE-HANDLE tt.

CREATE TEMP-TABLE tt.
tt:CREATE-LIKE(pcTableName).
tt:TEMP-TABLE-PREPARE(pcTempTableName).

Does anyone know how to define a dynamic table that contains a BEFORE-TABLE? I don't see where this can be done syntactically.

-Chad Johnson
 
Excellent, I will take a look!

-CJ

Chad,

The example on my blog does not include dealing with table handles. That is a significantly complex enough task that I did not cover it in the example that I have provided. In order to do it, you need to construct the temp-table definition on the Java side before you pass it to the AppServer.

I don't have sample code for how to do this (production yes, not sample) because the way I have done it is to construct an object model that is a facade on the front of the ProDataGraph. The facade allows you to interact with a temp-table class and add fields and indexes to it the way you would if you were doing it in the 4GL. Behind the scenes it creates you all the appropriate objects in the ProDataGraph.

If you would like more information about it, feel free to contact me through my blog and I will see what I can do about getting something together for you.

Bruce Gruenbaum
the software gorilla
www.thesoftwaregorilla.com
 
Back
Top