Create A Progress Table At Run Time

IanC74

Member
Hi,

Is it possible in Progress 9.1e to create a table at run time?

For example, i want to have the user enter field names on screen, create a table and fields on save.

Apologies if this has been asked before. I did search but couldnt find anything.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
There is SQL DDL; you could programmatically generate and run a SQL script, if you're running a SQL broker. You could programmatically generate a .df, though I'm not sure you can apply it online as far back as 9.1E; I think online schema changes were added to the product in about 10.1B or C. And of course there's the data dictionary.

That said, entrusting a user to create schema and make valid storage-allocation decisions seems to me a really bad idea, unless it's a training exercise with a throwaway database.

If it is a training exercise, use the data dictionary, as that's likely what they'll ultimately be using.
 

IanC74

Member
Thank you for your reply. Great, Ill take a look into that.

Yes, sorry my question was a little vague its not a "user" as in end user. Its more from a tech point of view. I wanted to create a table based on a file list of fields to allow me to work on a concept idea.

I wouldnt let our end users near our datadictionary let alone create fields :)

Regards, Ian
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
I wanted to create a table based on a file list of fields to allow me to work on a concept idea.
The format of the .df is pretty straightforward if you just want to create a table and add fields and indexes. So if I were you I'd write a program to emit a .df with the necessary ADD statements.

If you also want to apply it programmatically, you can write a simple wrapper procedure for prodict/load_df.p.
 
Top