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 ?
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.
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.
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.
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.
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.
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 ??
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.