Error Messages (OpenInsight Specific)
At 21 OCT 1998 04:03:06PM Mary wrote:
I am trying to create a Btree Index which is returning an error message:
Create_Index(1, 'CUSTOMER', 'NAME', 0, 1)if Get_Status(ErrCodes) then...endSet_Status(0)dialog_box(.....)It returns an error code, such as FS145. How can I get a description for the error code?
For the uninitiated, if Set_Status(0) is not added then the following dialog_box is NOT executed.
At 23 OCT 1998 11:07AM Cameron Revelation wrote:
Hi Mary,
if Set_Status(0) is not added then the following dialog_box is NOT executed
I don't have the complete code you are using but I would suggest you re-arrange it slightly like:
<code> $insert Logical ... Set_Status(FALSE$) Create_Index(1, 'CUSTOMER', 'NAME', 0, 1) if Get_Status(ErrCodes) then Set_Status(FALSE$) ... end Dialog_Box(...)</code>
That way, the status is always cleared before Create_Index so you can be sure that an error, if it exists, came from that call. Also, you only have to clear it afterwards if an error is reported by Get_Status.
It returns an error code, such as FS145. How can I get a description for the error code?
Second, FS145 is "File does not exist". You can determine this by looking in the insert record FSERRORS_100. (Press Ctrl-I in the System Editor for a list of inserts. You can also use File-Open Record in the System Editor and look directly at SYSPROCS if the inserts are not listed in a derived application.) Alternatively you could look at the REVERRROR.DAT file in the OpenInsight directory.
Not counting the RDK, the error message is only set by one of the following:
RTP57 - the Linear Hash filing system
DeleteFile.Sub - implements the Delete_Table command
Copy_Table - as the name says
Rename_Table - as the name says
CreateTempDict - used by Table Builder and Form Designer via the Table API
I'm guessing that it occurs in RTP57, which sets it for the following operations only:
Open.File
Rename.File
Delete.File
Create.Media
I'm guessing that it occurs in Open.File, and it occurs because the REVMEDIA table is missing the entry for the file that is trying to be opened. This is possible if the REVMEDIA is out of sync with the SYSVOLUMES/SYSTABLES, and that is very easy to fix if you simply detach and re-attach the table in question, then save your database definition (Define_Database or use the menu item in database manager).
You did not mention what version of OpenInsight you are using. One potential cause of this problem has been fixed automatically in 3.6 or 3.61.
Get_Status allows you to get more error information than just the code. Hopefully, there is more information than what you mentioned. Try putting a debug statement in right after you call Get_Status and examine the information in the debugger. There should be a table name that follows the error code so you can determine what table the error occurred on.
Finally, as an explanation for how this could have happened:
1. You had placed indexes onto table CUSTOMER and saved your database definition
2. You later removed all indexes from table CUSTOMER but did not save your database definition, so the ! file still existed in SYSTABLES (i.e. it still existed in the DBT) but when the last index was removed, the underlying LH file was deleted
3. You are now trying to add an index to CUSTOMER, and OPEN believes that the ! file exists (it is in SYSTABLES)
4. OPEN tells RTP57 to open the table
5. RTP57 looks for the table information in REVMEDIA but it does not exist there so its sets the error
Cameron Purdy
Revelation Software