Create Database/Table/field with progress manual

Sorry, what do you mean with Progress Manual please ? Do you simply need to know how to create, etc. is it GUI ? Where is data coming from.
 

sharkdim

Member
my mean is :
how to create database/table/fileds with manual,by coding, such as :
by SQL: create table dd ....
i know how to create temp-table:
define temp-table tt_manul
fields tt_manul_id
fields tt_manul_name.
....
but after closing application , temp-table will be deleted.
i want to create a "fix" table with coding.
can you help me ?
 
Hi There,

Temp tables only exist at the session level, so, to compare them to actual database tables isn't sensible.

To create a structure in the database ideally you would use the Data Dictionary. Another method is to create a .df file (from another database) and load it into the database (using the data dictionary). If you were confident enough then yes you could manually create a .df file (or 'tweak' an existing one) - I'd not recomment this either.

Progress does have system tables, e.g. _file, etc. (which contain details about the tables, etc. which reside in the database), but, I'd 100% say DO NOT use these to create databases/tables on the fly - in fact I only ever READ these. I've never tried creating a schema by creating system tables and am not even sure it can be done.

If you have a test environment and wish to try it then look at the _file and other system tables - I'll stop at this point 'cos I don't want to be responsible for helping you screw up a live database.

Possibly you could clarify why you wish to do this when Progress have created a perfectly decent set of database admin. tools !! If you can get back to me with a valid reason then I'll attempt a test environment for you and provide you with the code. I do think you may be going in the wrong direction though.

Thanks,
Dave.
 

TomBascom

Curmudgeon
Progress_Guy said:
Progress does have system tables, e.g. _file, etc. (which contain details about the tables, etc. which reside in the database), but, I'd 100% say DO NOT use these to create databases/tables on the fly - in fact I only ever READ these. I've never tried creating a schema by creating system tables and am not even sure it can be done.

Yes, it can be done. But you have to be a serious glutton for punishment to want to go there...

As Progress_Guy says -- don't do it. Use the dictionary tools.
 

gcampbell

Member
Like everyone else has mentioned, use the Data Dictionary tool that comes with Progress --- no need for manual creation.

But, saying that, if you want an example of how to create a table/field/index manually, then create a dump of the Data Definition for a database (use the Data Administration tool for that). This illustrates how Progress has implemented manual updates. You then can run the load_df.p procedure to load the DF into an empty database.

But, again, it's all too much trouble. Use the Data Dictionary ....or, use a utility like PCASE (from www.tools4progress.com) that allows you to visually create/maintain your DB then applies the updates.

later,
Gordon
 

lord_icon

Member
RE: Create Database/Table/field

Noddy 4GL here, nobody has offered any syntax to help.
Within your 4GL session.
Execute a block / procedure that ...
CREATE tableName.
FIELD-LIST fieldName AS DataType
ASSIGN fieldName = Value.
It is better practice to use a TempTable here, though that is NOT the only method, you can easily CREATE a noddy physical db, though a TempTable would surfice.
 
lord_icon said:
Noddy 4GL here, nobody has offered any syntax to help.
Within your 4GL session. ....
It is better practice to use a TempTable here, though that is NOT the only method, you can easily CREATE a noddy physical db, though a TempTable would surfice.

He/she is trying to define a (permanent) database table, not fill it. You can't do this through 4GL.

If you create a table through SQL sharkdim, you will not be able to maintain it through the normal Data Admin tools. Use those instead.
 
Noddy 4GL here, nobody has offered any syntax to help.

Yes, he/she wants to do structure of dbase and not dbase.

As I said I've never done this before using schema tables (not sure if can), but, I'm sure one of us could come up with some code, but, as I said it's dangerous to do and I wouldn't advise unless a valid rweason for wanting to do so is provided.

Not me being awkward, simply a V. dangerous thing to do (if possible).

As a matter of interest has anyone done this before ?? If so why ??
 

gcampbell

Member
It is obviously possible via the 4GL -- you just need to know how to do it.

The Progress load_df.p illustrates how to do this, plus Roundtable has written their own database updater routine.

It's a lot of work to do, so I'd recommend building a .df file that you can load via load_df.p.

Later,
Gordon
 
gcampbell said:
It is obviously possible via the 4GL -- you just need to know how to do it.

I meant through a simple 'DEFINE TABLE' type declaration. I should have clarified.

The other comments about _File tables had already been made.
 

schaapie

Member
Yes, it can be done.
Yes, i'm probably "a serious glutton for punishment" whatever that means.
I did it because we were creating a datawarehouse and weren't happy about the tools available. It had to be tied in with the production- db's logical and fysical db-scheme, batchjob scheduling, incremenal load OUR way etc.
We're creating (and deleting) _file's and _fields on the fly, indexes and sequences are still done in de Progress datadict.

So yes, you can "create _file" and "create _field" (Progress does this too in their datadict-programs)
and
yes you have to be VERY CAREFULL.

and since SharkDim hasn't given a good reason to do this I still advise against it.
 
Oh no Schaapie.

I'm breaking out in a cold sweat.

I'm seriously worried for you,.

How do you sleep at night - lol.

Seriously, As no decent reason has been given I'll hope our advice has been heeded.
 
Top