Randy, Thanks for the thoughts. I knew about the various list/unload options. What I really was looking for is to read the system tables to determine this. I would like to use it in an application I am developing to reverse engineer an R:Base database into a StarDesignor ".PDM" file.
StarDesignor (if you did not know) is made available on Mike Bayerly's web site. It's a great tool for documenting and possibly modifying you database. The free version Mike is distributing has several shortcomings in reverse enginerring a R:Base database via an ODBC driver. It will not extract views, stored procedures, triggers and rules. After intensive browsing on the Sybase web site (They own StarDesignor) I have found documentation on the ".PDM" file and on the ".DEF" file. I am working on a revised RBASE65.DEF file. My revised file better matches R:Base syntax. But to be truly useful I need to reverse engineer the above mentioned constructs plus handle some R:Base specific syntax. To do this I have been developing routines that process system tables into the StarDesignor ".PDM" file. The ".PDM" file contains StarDesignor's method of describing a databases physical implementation. The ".PDM" structure is rather simple. The challenge is mapping the R:Base values to the ".PDM" structure. Severa areas for this are challenging Thus my question to the list. Processing data written to an external file is some what beyond the scope of the R:Base programming language. -- Jim Bentley American Celiac Society [EMAIL PROTECTED] - email (973) 776-3900 x5029 - voicemail/fax ---- randyp <[EMAIL PROTECTED]> wrote: > Jim, > > The easiest way is to LIST TABLE tableName > It lists Table: Person > Description: 1 row = 1 person > > Flags: CASCADE > > Another way to see them all would be to: > OUTPUT fCascade.str > UNLOAD STRUCTURE; OUTPUT SCREEN > Then use an editor to search for the word 'cascade' > in the file fCascade.str. > > It appears in the table definition line as: > CREATE TABLE `Product` CASCADE + > (`prID` INTEGER NOT NULL , + and so forth. > > In the Sys_Indexes table there is a column containing '1' > for sys_primary_key. Only tables having a primary key > would be candidates for the CASCADE option. > > The sys_referenced column contained a '1' for two of three > primary key columns in my database which have the cascade > option. However there were several others with a '1' which > did not. This referenced column is filled using the command: > > ALTER TABLE `notes` ADD FOREIGN KEY + > `personNo` REFERENCES `person` ... followed by > error message definitions. > > Randy Peterson > > James Bentley wrote: > > > Greetings all, > > > > Does anyone know how to determine if as table was defined > > with the CASCADE option by looking at such tables as > SYS_TABLES, > > SYS_COLUMNS, SYS_INDEXES, etc. Please indicate which > "sys" > > table and column along with value within that column. > > > > -- > > Jim Bentley > > American Celiac Society > > [EMAIL PROTECTED] - email > > (973) 776-3900 x5029 - voicemail/fax > > > > __________________________________________________ > > FREE voicemail, email, and fax...all in one place. > > Sign Up Now! http://www.onebox.com > > __________________________________________________ FREE voicemail, email, and fax...all in one place. Sign Up Now! http://www.onebox.com
