How to create table through code

sk_manu

New Member
Hi all,

I want to know, how to create table from code,as we do in oracle. Is there any other way to create table rather than through data dictionary..

Thanks
Manohar
 
Hi,
you can prepare a .df file using the data adminstration tool and use RUN prodict\load_df.r ("name of the def file") to change the schema of the destination db.
Regards.
Stéphane.
 
Raghooveer,

Wow, bro, that is really not a good idea !!!



Although the Dictionary makes changes to the schema thru system tables, like, _file, _field etc.

The how-to is undocumented and could change at any version, not backwards compatible.

So not only are you running a risk of corrupting the schema,

but even if you knew exactly how-to and what fields to set it might not work once you upgrade.

As a rule of thumb never mess directly with the tables of an app you did not design.



I would strongly recommend creating a .df file and using the current version's prodict/load_df.p

You could also make changes to the schema thru the SQL engine.

Another thing worth mentioning is that only the latest 10.1A release

has online schema changing features ( no schema locking ).
 
Create table on-the-fly

To create a table on-the-fly in Progress OpenEdge is simple (you should try and catch up Oracle!!!)
simple syntax would be;
....
CREATE tableName.
ASSIGN
 
tableName.fieldName = "Value" / variable.

Simple when you know how.
CREATE tableName / eg.customer
ASSIGN
(customer) Custnum = value
(customer) FieldName = value
 
Back
Top