home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.ingres
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!uvaarpa!cv3.cv.nrao.edu!mail-to-news-gateway
- From: drcoles@somnet.sandia.gov (Dwight R Coles)
- Subject: Re: Creating Table Fields on the Fly
- Message-ID: <9207242017.AA02972@somnet.Sandia.GOV>
- Sender: root@nrao.edu (Operator)
- Organization: National Radio Astronomy Observatory
- Date: Fri, 24 Jul 1992 20:17:38 GMT
- Lines: 44
-
- > In article <1992Jun15.141818.18709@schaefer.math.wisc.edu>,
- > horn@schaefer.math.wisc.edu (Jeffrey Horn) writes:
- > > Would anybody out there have an example of how one might create table
- > > fields on a ingres form on the fly. What I want is an example of how
- > > a QBF retrieve is actually programmed in embedded SQL or in ABF/4GL.
- > > That is, first look up the definition of a database table, then create
- > > a table on a form with appropriate columns, then fill the table. What
- > > I can't figure out how to do is the creation of a table field on the
- > > fly!
- >
- > My only suggestion (and it's a kluge) is to reverse engineer the system
- > catalogs that hold forms--ii_objects, ii_forms, ii_fields, ii_trim, and
- > maybe ii_encoded_forms. A form is nothing more than a bunch of entries
- > in these tables, and a table field in particular is a bunch of entries
- > in the ii_fields system catalog.
- >
- > This is dangerous because they can change at any time the system
- > catalogs that hold front-end objects (but not the Standard Catalog
- > Interface to back-end objects, except for adding new columns), but you
- > might be able to use it in a pinch. Also, an application that did this
- > would have to connect to the database as the dba, or with a special
- > flag, like "+U". This would certainly limit its utility.
- >
- > --Mark Jaeger internet: cs_mj@gsbvax.uchicago.edu
-
- Well, folks, this can and has been done. I developed what I called
- programmable-qbf about three years ago, using exactly what Mark
- alluded to - reverse engineer the forms-definition system catalogs.
- Then you 1) read the data-definition system catalogs
- 2) determine what the form needs to look like
- 3) write to the forms-definition catalogs
- 4) run the application code which uses the form (although,
- sigh, I never figured out a way to compile the form
- and dynamically link it into the running application).
- If you are REALLY interested in following the same path and are willing
- to update the code to run with V6 catalogs, and translate it from
- QUEL to SQL (it is in parameterized QUEL, and will probably need
- dynamic SQL), then drop me a note and we'll talk. It took about
- a month the first time, so I won't do it myself again unless forced.
-
- Dwight drcoles@sandia.gov
-
- and oh by the way, I didn't have to use a special connect privilege -
- you can write to the forms definition catalogs without it, as I recall.
-