========================================================================== SUPERBASE PROFESSIONAL 4 VERSION 1.01 JULY 2ND, 1991 ========================================================================== This document contains information which could not be included in the User Guide. TUTORIAL -------- The Superbase tutorial in Chapter 33, Volume 1 of the User Guide should be done in the IDEAS sub-directory. IDEAS contains the ACCOUNTS.CSV file, which is required for the tutorial. DBASE FILES UNDER DML --------------------- dBase files opened directly under DML must be indexed before you can browse, using SELECT NEXT and SELECT PREVIOUS. COMPATIBILITY WITH SUPERBASE 4 WINDOWS -------------------------------------- Superbase Professional 4 is largely compatible with Superbase 4 Windows. Data files and programs should be portable between the two without difficulty. However, forms are not compatible and must be created using the appropriate version of the Form Designer. The following DML commands are either not available or do not function identically in both environments: BELL CALL DDE$ DDEINIT DDETERM DDEPOKE DDEREQ DDEEXEC FN sys FREE SAY SET MIN SET PG SET PRINTER STATUS ON/OFF All LAN-specific commands In addition, commands introduced in Superbase 4 Windows Version 1.3 are not available in Superbase Professional 4 Version 1.0. COMPATIBILITY WITH SUPERBASE PROFESSIONAL V. 3.02 ------------------------------------------------- A few 3.02 level DML commands behave differently under Superbase Professional 4. LOAD SET expects to find a SUPERBASE.INI file in S: SET FORM is replaced by SET PAGE. SET PG 3.02 syntax only works if the printer is set to PREFS. SET PRINTER ON/OFF is obsolete. MARGINS ------- The margins set in the Set Page requester are additional to those set in Preferences. For example, a Set Page left margin of 1 inch and a Preferences left margin of .5 inch results in an overall margin of 1.5 inch. PRINTING -------- If you are using a Superbase SB_printername.ini file, you must ensure that this printer is also selected as the preferences printer. MAIL MERGE ---------- Mail Merge does not allow long text data (i.e. longer than 254 characters) to be used with fixed length document fields. ICONS ----- A range of alternate icons for Superbase and the Form Designer are located in the directory SBPRO4:icons. These icons have been designed using the Workbench 2.0 colour scheme, and are in 4, 8 or 16 colours. DANISH AND NORWEGIAN CHARACTER SETS ----------------------------------- For file compatibility with Superbase 4 Windows, Superbase Professional 4 stores data internally in the IBM PC character set. It converts what you type from the standard Amiga (ISO) character set, when data is saved, and similarly concerts back when data is retrieved. There are, however some characters which are in common use in Denmark and Norway that are not represented by the IBM character set. These are the characters æ, Æ, ø, Ø, â and Â. When attempting to use these characters, they will not be converted correctly, and consequently get displayed as underscores (_). Users that require access to these characters should edit the file S:Superbase.ini (this is the file Superbase uses to store its default values) and change the line Chargroup=0 to Chargroup=1 Save the file and restart Superbase. The Danish and Norwegian characters will now be available. DML COMMANDS NOT DOCUMENTED IN THE MANUAL ----------------------------------------- The following DML commands function slightly differently to their description in the manual, or are not mentioned in the manual. ? ERROR Returns the AmigaDOS error code for the last disk activity error. Note that ERROR returns a different set of error numbers to ERRNO which returns Superbase errors. See your AmigaDOS user guide for more detail. ? MEMORY [pattern string] When the MEMORY command is followed by a pattern matching string, it only displays the memory variables that match that string. The pattern matching must conform to the syntax used for strings with the LIKE operator; i.e. you can combine any alphanumeric characters with the following pattern matching characters: *?[]^ ? MEMORY "[a-f]*$" - Only displays strings starting with a through f ? MEMORY "*%%" - Only displays integer numeric variables ? PAGE Returns the current page number for an open form. ? ROW When ROW is used without any parentheses, it returns the row number of the last form transaction line in which there was an active cursor. One useful application of this would be to detect the transaction row a user selects for editing or deleting. ROW returns the number of the row in which the user has clicked even if the user has clicked on a Read Only field where the cursor could not be activated. ? WHERE when used as a system variable, WHERE returns the filter for the current file as a string. This allows the program to analyze the results of user input during a SELECT WHERE ASK command. For example: SELECT WHERE ASK x$ = WHERE IF x$ LIKE "*Field1*" THEN fld$ = "Field1" ADD ADD can be used under DML control to add new fields to an existing file definition. If you include IXU or IXD in the field definition string in order to specify an indexed field, Superbase does not generate an error even though there is no index. However, you must create an index for the new field before saving the file definition and closing the file, or Superbase will be unable to re-open the file. CLEAR [ERROR / ERRNO / ORDER / ROW] This clears the specified system variable. i.e. sets its value to zero. EDIT QUERY [,] Returns which of the redirection buttons was selected when the user OKayed the Query dialog. The values returned are as follows: 0 Screen 1 Printer 2 Disk file 3 Superbase file 4 Speech ENTER [ON/OFF] The ON/OFF parameter allows Skip Entry buttons that are outside the specified data entry range to be accessed. USING ENTER IN PUSHBUTTON COMMANDS You may use ENTER in a pushbutton command line. However, if the line contains more than one command, ENTER will always be executed after the other commands, even if it precedes them in the line. Multiple ENTER commands are not allowed, and the ENTER keyword may not be used in an Auto Execution command. FN PHONE(strexpr) This formats a 7 or 10 digit number in the style of U.S. phone numbers. If the string contains alphabetic characters, FN phone ignores them; if the string expression contains any other number of digits, the function returns it as it is, without reformatting it. Note that FN phone can be used at the file definition level in a calculation or validation formula attached to a field. ? FN phone("1234567") displays 123-4567 ? FN phone "1234567890" displays (123) 456-7890 LOAD FORM Allows you to open a form without displaying it. Superbase does not change screen resolution to match the form until a FORM command is issued. Any files associated with the form are opened however. LOAD FORM does not affect the current view mode or current records: it does not select any records, it does not display the form, and it maintains the current view mode. Normally if the form contains a read only command which is first in the data entry order, the command is automatically executed when the form is opened. LOAD FORM ignores the command and does not execute it. LOOKUP A virtual field with a calculation formula involving a LOOKUP to a second file causes the current record in the second file to change whenever a record is read in the first file. Superbase's query facilities, Process Query and the DML SELECT command do not support virtual fields that use LOOKUP when the two files related in this way are both involved in the query. MAKE DIRECTORY This command creates a new subdirectory. It is equivalent to the AmigaDOS command MakeDir. MENU The MENU command allows you to specify a menu item `separator'. This is a line across the menu list that separates blocks of related items. The value 3 should be specified for the third numeric parameter, and there should be no text string. For example: MENU 1,2,3 MOD() This function can be used to determine if the current record in memory for the specified file has been modified. If the record has been modified, the function returns -1, otherwise it returns 0. For example: ? MOD("Addresses") NEW() This function can be used to determine if a new record has been created but not yet saved. If the record is new, the function returns -1, otherwise it returns 0. For example: ? NEW("Addresses") NOT / AND / OR In queries, care must be taken when using these operators with numeric expressions not equal to 0 or -1. For example, when using AND, you intuitively expect that both operands must be true for the whole expression to be true; however Superbase treats AND as a bitwise operator if both operands are integer ot long type, but not as bitwise if either operand is real type. OPEN() This function can be used to determine if a specified file is currently open. If the file is open, the function returns -1, otherwise it returns 0. For example: ? OPEN("Addresses") PANEL ON / OFF This turns on (activates) or off (deactivates and dims) the specified buttons on the VCR control panel. This allows you to (say) prevent the user from setting or altering a filter while in a WAIT PANEL. The buttons are numbered from 1 to 12, starting from the left (1 corresponds to the Pause button, 12 to the Camera button). Examples: PANEL OFF 1, 2, 12 PANEL ON 1 REMOVE DIRECTORY This command removes a subdirectory. It is equivalent to the AmigaDOS command Delete REQUEST IN VALIDATION FORMULAE Field validation formulae may use any form of the REQUEST command that returns a value into the field to which the formula is attached. This includes REQUEST 4 through REQUEST 20, and REQUEST 23 through REQUEST 24. SELECT and UPDATE SELECT and UPDATE allow command substitution with variables, allowing you to program these statements dynamically. Instead of entering the fieldnames and filter conditions (and other elements of a query or update `clause') directly in the SELECT or UPDATE statement, you can assign them to string variables before executing the statement. To do this, you must use the notation $a$, where a$ represents the string variable which contains the query or update clause. For example: 1. a$ = "Customer_ref.Clients, Firstname.Clients, Lastname.Clients" b$ = "Lastname.Clients LIKE ~[a-m]*~" c$ = "Country.Clients" SELECT $a$ WHERE $b$ ORDER $c$ 2. a$ = "price.Orders = Price.Stock" b$ = "Prod_Code.Orders = Prod_Code.Stock AND order_Date.Stock > ~1 jan 1991~" UPDATE $a$ WHERE $b$ END UPDATE See also the sections on Field and Variable indirection later in this readme file. SER A SER calculation formula should use the name of the field to which it is attached rather than the literal name of the file to which it refers. Superbase is able to resolve fieldname references during Query to file or Reorganize. SET ERROR [REQUEST] ON/OFF [,...] / ALL SET ERROR OFF causes Superbase to perform an automatic RESUME NEXT if the specified error occurs, thereby effectively disabling that error. The ALL option disables all error numbers. The REQUEST option turns off Superbase's data validation retry dialogs (e.g. Invalid Date) and generates the corresponding DML error. If this error is encountered, data entry is terminated. The error can also be disabled in DML by issuing a separate SET ERROR OFF command. SET ERROR ON re-enables the specified error. SET FORM ON/OFF [,...] This allows you to enable or disable selected fields, commands or calculations on a form. Disabling a field or calculation variable is equivalent to making it read-only. If a calculation or command is disabled, clicking on it will no longer cause the command string to be performed or executed. The field parameter must refer to a field on the form; var must be a calculation or command name. SET INDEX /ALL This sets the index pointer for the specified field, or for all indexed fields to point to the current record in memory. Superbase keeps a separate pointer for each index used with an open file. When the file is initially opened, the index pointers point to the first record in the file according to the different indexes. Subsequently an index pointer points to the last record that was selected using that index. if you select a record using one index and then switch to another index (using the INDEX command) the new index will not necessarily point to the same record. SET INDEX allows you to force the new index to point to the current record. SET LABELS REQUEST This invokes the Labels dialog, allowing the user to define a labels layout under program control. SET PRINTER [REQUEST] This invokes the Printer Setup dialog. If the REQUEST option is specified, Superbase will also invoke the Page Setup dialog when the Printer Setup dialog is OKayed. SET STATUS Places the specified string into the status line. A string value of "" will cause the status bar to return to its default value. On the Amiga, the window header for the VCR control panel is used as the status bar. STATUS ON/OFF This enables or disables the status bar. On the Amiga, this is the window title bar for the VCR control panel window. STATUS ON clears the title bar and readjusts the main Superbase window borders to make the status bar visible. STATUS OFF restores the default contents of the window title bar, and readjusts the main Superbase window borders to cover it. WAIT MOUSE The WAIT MOUSE command does not interpret the act of editing a field, which involves clicking the mouse, as a triggering event. Consequently, clicking on form check boxes or radio buttons that are attached to fields will not cause processing to continue. Form check boxes or radio buttons that are attached to variables rather than fields are not subject to this restriction. WAIT PANEL OR KEY etc. allows the addition of OR FOR