Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 04 MAY 1998 12:26:12PM Oystein Reigem wrote:

Gurus (and semi-gurus too),

Here's a really simple question. At least I hope it's simple for you who did follow the LH 101 course: How does one generate a LH table programmatically?

You see I will make a new app, with LH tables. Some of the tables have very many fields. I know there will be a fairly long time of experimentation and adjustment during while the table definitions will be in flux. Fields will be added and removed, field names be changed more or less systematically, column headings will be added and changed, tables will be split and joined, etc.

I don't think Table Builder is the ideal tool during this phase. I think I'd like to have this comprehensive, compact, text-based definition of the tables and re-generate from that when I make changes. The text-based version can e.g be a tab-delimited something I can edit in Word table or Excel spreadsheet. (My test data may go out of synch each time I re-generate, but that is less important.)

So what do I do when I create the table? Use Create_Table to create the dict and data part? And then just write the dictionary entries for each field? (I think I can grasp enough of the Dict_Equates to see what should be in each dict row, and anyway I can study my old dict rows.) And a %SK% row if necessary? And detach and reattach to generate %FIELDS% and %PROTECT.SPEC%?

Please don't just answer yes or no. Please do flesh it out with a couple of particulars…

I do look forward to your replies!

- Oystein -


At 04 MAY 1998 02:20PM Gary Gnu wrote:

What about gnus? How about demi-gnus?

Being a gnu, and not a guru, I don't know much about LH. However, the help file tells me:

If the user creating a table is not a database owner (System Administrator), then his name is prefixed to the table name, to identify the table as being owned by that user and therefore not available to everyone.

To create a table using the toolset, use the table builder.

If you must create a table programmatically:(emphasis added)

1. Call Create_Table to create only the dictionary portion of a table.

2. Call Create_Table again, this time to create the data portion of the table.

All the % records will handle themselves as you write to the dictionary.

Gary Gnu


At 04 MAY 1998 03:27PM Oystein Reigem wrote:

Gary,

I think I did it. Even if you didn't tell me much more than I already read from the documentation myself you kicked me from my paralyzed state. (Or don't gnus kick but butt? (And is butt the correct word?)) It's just that I have very bad memories from the last time I tried to do something similar. Back in OI 2.0 I tried to create my tables with huge SQL Create Table / Alter Table commands. I thought it so convenient to have them as SQL commands that I could quickly change and run again. I am fairly certain I got SQL correct but boy did I struggle with those tables. They were like full of ugly stuff inside that every now and then burst to the surface like…. Aaaaaagh!!!

- Oystein -

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/05d1a8e97da3946c852565fa005a4a11.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1