The big advantage to this is that you can connect to any version of the DB and the app will run well. It may be old code on an old database but there will be no surprises.
This can be a lot of effort to achieve but is great when you need to report from an old database. Someday......... Dennis McGrath ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Doug Hamilton Sent: Friday, October 09, 2009 11:49 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: RMD files stored in the Database Tom, I use a table like Karen's (mine is named InternalCode) and have a few additional columns: ICDescription, note: A brief description of the what the code does. Also contains info to run the code. For example, I have a block of code called Pause2 that generates uniform Pause 2 commands using predefined variables. I copy and paste The ICDescription for it into my working code: --vPau2* vars are cleared in command file Syntax: --nb: vPau2Icon values are Attn,Conf,Erro,Help,Info,Ques,Seri,Stop,Warn --nb: SET vPau2Caption TEXT = 'Test' to test icons from Choose SET VAR + vPau2Button TEXT = '', + vPau2Caption TEXT = '', + vPau2Icon TEXT = '', + vPau2Msg TEXT = '' RUN SELECT CmdCode FROM InternalCode WHERE CmdName = 'Pause2' ICDatabase, text 16: This field contains either the name of the specific db in which it is used or "generic". Some code is unique to a specific db; other, e.g. GlobalVars and Pause2 above, is used in many/all dbs. If I develop a universal block of code, it is labeled "generic". I can then easily identify those rows and export them for use in other dbs. ICModified, datetime: Date of most recent update. Useful when determining if client's db has most recent version of this code. Some year I'll finish an edit form for this table that will manage the above columns and have an edit window for the code. All my code is now within the db except for RBase.DAT. Provides better security and sanity. Doug [email protected]<mailto:[email protected]> wrote: Hi Tom!! Took me a while to adopt this method, but now I incorporate it in all my apps. Especially now that I embed the code within the form itself, I found that there were a bunch of places where I needed to call the same block of code (like searching for a customer). I have a table called CommonCode. Table: CommonCode No Lock(s) No. Column Name Attributes --- ------------------ ------------------------------------------------------ 1 CCID Type : INTEGER AUTONUMBER Index : SINGLE-COLUMN 2 CCName Type : TEXT 15 3 CCData Type : LONG VARCHAR My CCName column has a description, like "GetAcct" or "GetItem". The CCData is where I type in the command file. I usually create a temporary command file first to debug it, then copy and paste it into the table. You call it by RUN SELECT ccdata FROM commoncode WHERE ccname = 'GetAcct' Karen Is there a way to store RMD files within a database and retrieve them for use? Our audit system uses EEPs that all share an identical blocks of commands that (once the light bulb went on in my head) can be done through an RMD. Looking in the SAT examples shows many RMDs in a file format. That seems to allow something to get 'lost' or 'changed', but storage within the database makes portability much easier. I recall reading about this but cannot find it help files or stored emails. Any suggestions?

