home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / database / ingres / 1000 next >
Encoding:
Text File  |  1992-07-25  |  2.7 KB  |  55 lines

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