home *** CD-ROM | disk | FTP | other *** search
- ===============================================================================
- MICROSOFT DATABASE VERSION 1.00 March 20, 1990
- ===============================================================================
-
- This document contains information which could not be included in
- the User Guide.
-
- FUTURE RELEASES OF MICROSOFT WINDOWS
- ------------------------------------
- Microsoft Database is designed to be compatible with future releases of
- Microsoft Windows. In the event of a future release of Microsoft
- Windows not being compatible with your copy of Microsoft Database, contact
- your supplier for details of forthcoming updates of Microsoft Database.
-
- ADDITIONAL AND EXTENDED DML COMMANDS
- ------------------------------------
- The SET EDIT ATTR ON command forces all form data editing into monochrome:
- black text on a white background. The purpose of the command is to
- provide an editing focus for the user where the presence of colored fields
- on a form could be confusing.
-
- The command may be executed either before an enter command or before native
- mode data entry.
-
- SET EDIT ATTR OFF makes data entry use the colors originally defined for
- the field.
-
- CALL
- ----
- CALL may be modified to force a called application to open its window
- in a pre-defined mode. The extended syntax for this command is:
-
- CALL strexpr [,nexpr]
-
- Nexpr may have the value 0, 1, 2, 3, or 4.
-
- 0 Application runs in a minimized window
- 1 Application runs in a normal window
- 2 Application runs in a minimized window as an icon
- 3 Application runs in a maximized window
- 4 Application runs in a deactivated normal window
-
- EJECT GROUP
- -----------
- The EJECT command has an optional parameter GROUP, which should be
- used to suppress the EJECT for the last group in a report. This
- avoids the unnecessary printing of a blank page after the last
- group.
-
- EXPORT ENABLE
- -------------
- The EXPORT command allows you to specify a dBase destination file.
- By including the parameters "2" or "3" you may distinguish between
- dBase II and dBase III.
-
- You may also export Enable files. If you wish to create an Enable
- file definition ($BF extension), use the parameter "0" instead of
- "2" or "3".
-
- SET FN KEY
- ----------
- The SET FN KEY ON/OFF command allows the WAIT KEY command to detect the
- depression of a function key. If you want to be able to detect
- function keys with WAIT KEY, execute SET FN KEY ON prior to the WAIT
- statement itself.
-
- Use SET FN KEY OFF to disable the detection of function keys by WAIT
- KEY.
-
- When you are using Function Keys inside of a DML program, it is necessary to
- remember that, unlike in the Menu driven level, commands stored in Function
- Keys are not executed. Instead, the first character of the function key is
- returned to the WAIT KEY or GET command that normally looks at keyboard
- input.
-
- For this reason, the use of function keys inside of a program must be
- limited to to those applications where it is possible to pause and look at
- keyboard input. The following example shows an example of using function
- keys inside a DML program:
-
- Example
- REM *** Setup
- CLS
- ? "Press Shift-F10 to quit"
- REM *** Set up Shift-F1 to Shift-F10 as ASCII 129 to 138
- FOR x%=1 TO 10
- Key x%, CHR$(x%+128)
- NEXT x%
- REM *** Turn on FN Keys
- SET FN KEY ON
- REM *** Wait for a key
- GetKey:
- WAIT KEY a$
- IF ASC (a$) < 129 OR ASC (a$) > 138 THEN REQUEST "Normal Key
- hit","",113: GOTO GetKey
- ? "Shift-F";LTRIM$ ( STR$ ( ASC (a$) - 128,"99."));" key pressed."
- IF ASC (a$) = 138 THEN END
- GOTO GetKey
-
- FN alpha
- --------
- The function FN alpha (x$) returns a string containing only
- alphabetic characters (a-z, A-Z) from x$.
-
- x$ = "abcd-123;"
- y$ = FN alpha (x$)
-
- y$ contains "abcd"
-
- FN ansi
- -------
- The function FN ansi (x$) returns a string in which all IBM characters
- are converted to the ANSI character set.
-
- y$ = FN ansi (x$)
-
- Converts any IBM specific characters to their ANSI equivalent. See
- also FN ibm (x$).
-
- FN ibm
- ------
- The function FN ibm (x$) returns a string in which all ANSI characters
- are converted to the IBM character set.
-
- y$ = FN ibm (x$)
-
- Converts any ANSI specific characters to their IBM equivalent. See
- also FN ansi (x$).
-
- FN numeric
- ----------
- The function FN numeric (x$) returns a string containing only
- numeric characters (0-9) from x$.
-
- x$ = "abcd-123;"
- y$ = FN numeric (x$)
-
- y$ contains "123"
-
- FN path
- -------
- The function FN path (x$) returns a string containing all pathname
- characters including final backslash from x$. x$ should be a
- filename together with its path.
-
- x$ = "c:\data\myfile.sbf"
- y$ = FN path (x$)
-
- y$ contains "c:\data\"
-
- FN root
- -------
- The function FN root (x$) returns a string containing the root of
- the a filename from x$. x$ should be a filename together with its
- path.
-
- x$ = "c:\data\myfile.sbf"
- y$ = FN root (x$)
-
- y$ contains "myfile"
-
- FN name
- -------
- The function FN name (x$) returns a string containing a filename
- together with its extension from x$. x$ should be a filename
- together with its path.
-
- x$ = "c:\data\myfile.sbf"
- y$ = FN name (x$)
-
- y$ contains "myfile.sbf"
-
- FN ext
- ------
- The function FN ext (x$) returns a string containing the extension
- of a filename from x$. x$ should be a filename together with its
- path.
-
- x$ = "c:\data\myfile.sbf"
- y$ = FN ext (x$)
-
- y$ contains ".sbf"
-
- FN dec
- ------
- The function FN dec (x$) returns the decimal equivalent of a string
- presumed to contain hexadecimal.
-
- x$ = "1F"
- y% = FN dec (x$)
-
- y% has the value 31
-
- FN hex
- ------
- The function FN hex (x%) returns a string containing the
- hexadecimal equivalent of a decimal.
-
- x% = 31
- y$ = FN hex (x%)
-
- y$ contains "1F"
-
- FORMAT$
- -------
- The FORMAT$ function may be used to force query and report output
- to wordwrap within a column. The full syntax is:
-
- FORMAT$ (strexpr, nexpr1 [,nexpr2])
-
- FORMAT$ formats a text field or variable to a specified width by
- inserting carriage return characters.
-
- Strexpr is normally the fieldname of a text field, which may be up
- to 4000 characters long (see Note below). Nexpr1 defines the width
- of the column in characters.
-
- Nexpr2 specifies the line of the field to be output, allowing you
- to position formatted text precisely. If nexpr2 is omitted, the
- formatted text will be output in its entirety before any other
- items are output.
-
- 1. SELECT name.CLIENTS, @30 FORMAT$(comments.CLIENTS,40,1),
- telephone.CLIENTS, @30 FORMAT$(comments.CLIENTS,40,2),
- @30 FORMAT$ (comments.CLIENTS,40,3), @30 FORMAT$
- (comments.CLIENTS,40,4), @30 FORMAT$(comments.CLIENTS,40,5)
-
- Prints name, first line of comments field, and telephone number,
- then prints the next four lines of comments. The text in the
- comments column will be wordwrapped.
-
- 2. ? FORMAT$(field1,25)
-
- Prints the contents of field1 in a columns 25 characters wide,
- wordwrapping text when necessary.
-
- Note. Because FORMAT$ actually inserts formatting information into
- a field or variable, the formatted length may exceed 4000
- characters. In this case, characters beyond the 4000 maximum will
- be discarded.
-
- ORDER
- -----
- ORDER as a system variable. When used as a system variable, ORDER
- allows you to determine the data entry order of the last field edited
- on a form.
-
- Normaly the ORDER system returns the data entry order number of the last
- field or variable entered during Form data entry. However, if the user
- presses ESCAPE to terminate data entry, ORDER returns a negative number.
-
- If data entry is being done in Page or Record view, there is no data entry
- order number as this feature only applies to Forms. ORDER returns 1 when
- data entry ends after the last field has been completed, or -1 of ESCAPE
- has been used to terminate data entry.
-
- ORDER as a DML command. ORDER is a Query Language command and can only
- be used in a Query or Report section (i.e, in conjunction with the Query
- Language command SELECT).
-
- SET POSITION
- ------------
- The optional extension FOR windowname may be used to set the window
- position of an application invoked with CALL, such as Microsoft
- Windows Control Panel.
-
- SET POSITION FOR "control" x%,y%,w%,h%
-
- The string "control" matches the text in the center of the window's
- title bar.
-
- STORE
- -----
- The STORE command has additional syntax which allows you to store
- records faster than usual, with the drawback that the data is not
- secured automatically. This means that you can enter a batch of
- records and wait until you are ready to secure them, thus saving time
- during data entry. The extended syntax is:
-
- STORE [,0/1/2] [FORM/FILE sbfname]
-
- STORE,1 stores the current record without updating the file header.
- The time taken to save the data on disk will be reduced, but the data
- is not secure. A power loss, for example, would result in the entered
- data being lost. Note that the command only operates on the current
- record, i.e. it does not set this mode for future STORE commands.
-
- STORE,2 makes the file secure. It does not save the current record as
- such, but updates the control information in the file header. YOU
- MUST EXECUTE STORE,2 AFTER STORE,1 IN ORDER TO SECURE THE DATA.
-
- STORE,2 does NOT take the FORM or FILE parameters. It secures all
- unsecured data automatically.
-
- STORE,0 is optional and therefore is the same as STORE on its own.
- Data is secured as it is written directly to disk.
-
-
- WAIT PANEL LOCK
- ---------------
- The optional parameter LOCK may be used with WAIT PANEL. This prevents
- the user from switching to another page of the form while using the
- browsing controls under program control.
-
- NOTE: If you wish the browsing controls without the panel showing up on
- the screen AND you do not wish to have the user flip back and forth
- between form pages, use the command: WAIT PANEL OFF LOCK
-
- FURTHER NOTE: When you are in a program, several error conditions may
- occur that will terminate program execution unless you specifically
- look for them. A small program to do this would be:
- OPEN FORM "BrwsForm"
- ON ERROR GOTO CheckTrap
- AlowBrowsing:
- FORM 1
- WAIT PANEL OFF LOCK
- GOTO AllowBrowsing
- CheckTrap:
- IF ERRNO=8 THEN REQUEST "No such record.","",2,n%:RESUME AllowBrowsing
- IF ERRNO=10 THEN REQUEST "End of File.","",2,n%:RESUME AllowBrowsing
- IF ERRNO= THEN REQUEST "Break detected.","",2,n%:END
- REQUEST "Unexpected error has occured:",ERR$(ERRNO),113,n%
- END
-
-
- PROGRAMMED DATA ENTRY
- ---------------------
- The BREAK ENTER OFF/ON Command
- ------------------------------
- The ESCAPE key method of terminating data entry may be disabled with
- the BREAK ENTER OFF command. CTRL+C can still be detected after BREAK
- ENTER OFF has been executed, unless BREAK OFF has been executed
- separately.
-
- BREAK ENTER ON re-enables ESCAPE data entry termination.
-
- Using CTRL+C to terminate data entry
- ------------------------------------
- Unless the BREAK OFF command has been executed, CTRL+C can be detected
- during data entry.
-
- CTRL+C generates error number 11, which may be trapped following the
- ON ERROR GOTO command.
-
- Using ORDER with ESCAPE key termination of data entry
- -----------------------------------------------------
- Normally the ORDER system variable returns the data entry order number
- of the last field or variable entered during Form data entry.
-
- If the user presses ESCAPE to terminate data entry, ORDER returns a
- negative number.
-
- If data entry is being done in Page or Record view, there is no data
- entry order number, as this feature only applies to Forms. ORDER
- returns 1 when data entry ends after the last field has been
- completed, or -1 if ESCAPE is used to terminate data entry.
-
-
- STARTING MICROSOFT DATABASE BY OPENING A FILE
- ------------------------------------
- The WIN.INI [extensions] section includes four Microsoft Database file
- extension settings. You may run Microsoft Database by opening any of these
- types of file:
-
- SBV Form
- SBP Program
- SBF Data file
- SBD File definition
-
-
- STARTING MICROSOFT DATABASE WITHOUT RUNNING THE MS-DOS EXECUTIVE
- -------------------------------------------------------
- You can run Microsoft Database from the MS-DOS command line with the
- following option:
-
- WIN:MSDB
-
- The colon instructs Microsoft Windows to run without the MS-DOS
- executive, thus making more memory available to the system. However,
- this option makes it impossible to use the DML CALL command.
-
-
- REORGANIZE BACKUP FILE
- ----------------------
- The name of the backup file used by the Process Reorganize command has
- been changed.
-
- If you reorganize a file using its original name, Microsoft Database first
- makes a backup copy of it under the filename DBXREORG. The SBF,
- SBD, and all index files bear this root name during the process.
- DBXREORG is deleted after the reorganization is completed.
-
-
- PRINTING
- --------
- Process Print in Table View
- ---------------------------
- You may need to drag columns to the right on screen to set a
- width sufficient to avoid truncation when printing in some
- proportional fonts.
-
- Printing Object Classes in DML
- ------------------------------
- The PRINT CURRENT or PRINT FILE commands may have an optional PAGE or
- ALL parameter to print the current page or all pages of a form. This
- may now be followed by USING with up to seven optional parameters to
- specify centering and object class selection.
-
- Each parameter may have the value 1 or 0 to signify whether the object
- class should or should not be printed. The parameters may be numeric
- expressions. The order of the parameters is as follows:
-
- 1 Centering
- 2 Areas
- 3 Boxes
- 4 Lines
- 5 Text
- 6 Images
- 7 Fields
-
-
- PRINT CURRENT PAGE USING 1,0,0,0,1,0,1
-
- Prints the current page centered, showing only text and field data.
-
- If all parameters are set to 0, the default dialog is presented so that the
- user may choose desired options.
-
- ALIGNMENT OF OUTPUT
- -------------------
- Three modifiers are available for the & formatting parameter to specify
- left, right, or centered output of a field or variable.
-
- &[nn Left aligned output within a column nn characters wide.
- &|nn Centered output within a column nn characters wide.
- &]nn Right aligned output within a column nn characters wide.
-
- For example, to force a date to be left aligned in a column 20
- characters wide, use a command of the form:
-
- ? &[20 datefield.FILENAME.
-
- Note. Proportional fonts are not supported with this feature.
-
- The modifiers may be set from within the Report Generation part of the
- Form Designer. To specify the type of alignment required, select the
- item or items required, and click the justification tool in the
- toolbox to the left, vertical (centered), or right pointing position.
-
- IMPORTING DIF FILES
- -------------------
- The character set used by DIF files is assumed to be the IBM
- character set, unless the ANSI conversion option has been selected
- or the header of the DIF file has the title "Excel."
-
- DDE SYSTEM TOPIC
- ----------------
- The Microsoft Database system topic has been extended. This allows the DDE
- programmer to obtain information about the Microsoft Database system and use it
- to control Microsoft Database more precisely as a DDE server application.
-
- To use the system topic from within a DDE client application such as
- Excel, simply specify `system' in place of the filename that usually
- appears as the topic. Follow this with one of the following items:
-
- Item name: Returns:
-
- Topics All open Microsoft Database files plus `system' itself
- Formats CF_TEXT (the only format supported by Microsoft Database)
- Status `Ready' or `Busy' or `Active'
- ReturnMessage `OK' or Microsoft Database error message
- Fields All fields for the current file
- (expression) Variable values
-
- An example program that uses all of these functions follows.
-
- REM *** Written by: Mark C. Johnson
- PANEL OFF
- STATUS ON
- CLOSE ALL
- MOUSE ON
- SET PAGING OFF
- CLS
- winver% = 2:REM if you have the next version of Windows, set this to 3
- flg% = - 1
- ON ERROR GOTO DDECheck
- SET HEADING "Attempting to contact other Microsoft Database..."
- SET POSITION FOR "Attempt"0,0,640,250
- Start:
- DDEINIT 3,"MSDB","System"
- DDEEXEC 3,"set heading " + CHR$ (34) + "Slave Task:" + CHR$ (34)
- DDEEXEC 3,"set paging off"
- SET HEADING "Contact Established."
- DIM rt$(10)
- 10 :
- n$ = ""
- flg% = 0
- SET HEADING "Enter Command:"
- GOSUB GetLine
- IF n$ = "" GOTO 10
- IF UCASE$ (n$) = "EXIT" OR UCASE$ (n$) = "QUIT" THEN DDEEXEC 3,"QUIT":DDETERM 3:SET HEADING "":END
- REM *** First try and see if it is a valid system topic
- DDEREQ 3,n$,rt$(0),rt$(1),rt$(2),rt$(3),rt$(4),rt$(5),rt$(6),rt$(7),rt$(8),rt$(9),rt$( 10)
- ? "Reponse to `"n$"' was:"
- FOR x% = 0 TO 10
- IF rt$(x%) <> "" THEN ? rt$(x%)
- NEXT x%
- IF winver% = 2 THEN SET STATUS "Press any key...":WAIT KEY a$:SET STATUS ""
- GOTO 10
- 20 :
- REM *** Nope, was not a valid Request. Maybe it is a command?
- flg% = 1
- DDEEXEC 3,n$
- ? "Command Accepted."
- IF winver% = 2 THEN SET STATUS "Press any key...":WAIT KEY a$:SET STATUS ""
- GOTO 10
- SetupOther:
- REM *** Error routine for setting up other Microsoft Database if not found
- CALL "MSDB",1
- DDEINIT 3,"MSDB","System"
- DDEEXEC 3,"set heading " + CHR$ (34) + "Slave Task:" + CHR$ (34)
- SET POSITION FOR "Slave"0,250,640,150
- DDETERM 3
- RESUME Start
- GetLine:
- REM *** Routine to get a command line - since Windows 2.11 is slower
- REM *** than the later versions of Windows, we suggest you not use it
- REM *** (set the winver% variable to 2)
- n$ = ""
- IF winver% = 2 THEN
- REQUEST "Enter Command:","",4,n%,n$,60
- RETURN
- END IF
- GL1:
- SET STATUS ">" + RIGHT$ (n$,58) + CHR$ (5)
- WAIT KEY a$
- IF a$ = CHR$ (8) GOTO BSpace
- IF a$ = CHR$ (13) GOTO EndLine
- IF a$ = CHR$ (24) GOTO WipeLine
- IF ASC (a$) < 32 OR ASC (a$) > 127 GOTO GL1
- n$ = n$ + a$
- GOTO GL1
- BSpace:
- IF LEN (n$) = 0 GOTO GL1
- n$ = LEFT$ (n$, LEN (n$) - 1)
- GOTO GL1
- EndLine:
- SET STATUS LEFT$ (n$,60)
- SET HEADING "Sending command..."
- RETURN
- WipeLine:
- n$ = ""
- GOTO GL1
- DDECheck:
- REM *** Check to see if it was a valid DDE error, if so handle it
- REM *** otherwise - tell user what happened and stop
- IF ERRNO = 156 THEN
- IF flg% = - 1 GOTO SetupOther
- IF flg% = 0 THEN RESUME 20
- DDEREQ 3,"ReturnMessage",rt$
- ? "Invalid Command: "rt$
- IF winver% = 2 THEN SET STATUS "Press any key...":WAIT KEY a$:SET STATUS ""
- RESUME 10
- END IF
- IF ERRNO = 160 THEN REQUEST "Application Busy!","",2,n%:RESUME 10
- IF ERRNO = 154 THEN DDEEXEC 3,"QUIT":DDETERM 3:RESUME Start
- REQUEST "Unexpected Error:", ERR$ ( ERRNO ),113,n%
- DDETERM 3
- END
-
-
- Notes
- -----
- 1. Status. The `ready' status indicates that Microsoft Database is doing
- nothing, i.e. waiting for an event. The `busy' status indicates
- that Microsoft Database is executing a DML program. The `active' status
- indicates that Microsoft Database is executing some other process.
-
- The system topic status item should be used to ensure that
- Microsoft Database is ready to receive DDE commands. For example, if the
- DDE client application were to execute a DDE command that instructed
- Microsoft Database to run a DML program, Microsoft Database would
- initiate a process of indeterminate duration. Therefore the client
- application should use the status item to check that Microsoft Database
- is `ready' and not `busy' before sending any other DDE commands.
-
- 2. (expression). When using `expression', the parentheses are
- compulsory. The expression itself may be a string variable such as
- x$ or a system variable such as FILE. This is the only way to
- obtain the value of a Microsoft Database string variable in another
- application.
-
-
- USER GUIDE ERRATA
- -----------------
- Volume 1 Database and Text Editor
- --------
- Page Erratum
- ---- -------
- 3-2 In Creating an Empty Copy, change "see Chapter 15 Reorganizing
- the Database" to "See Chapter 16 ...".
-
- 3-3 Add to end of Caution that "Also note that passwords are case
- sensitive.".
-
- 5-6 Add note to end of page: "If you change the calculation formula
- for a virtual field, the index will not be updated and will not
- work as expected. The correct procedure is to remove the index
- first, edit the calculation and then rebuild the index.
-
- 6-7 Delete second occurence of "Beginning of Field" in table.
-
- 8-4 The figure $9.20 in the example should be $19.20.
-
- 16-2 Delete Paragraph 4, The & Length parameter may not be used to
- set a field's format in the new file.
- 16-4 Paragraph 2, delete the first sentence and substitute: "If you
- reorganize a file using its original name, Microsoft Database
- first creates a backup copy of it under the file name DBXREORG.
- The SBD, SBF and all index files bear this root name during the
- process. DBXREORG is deleted after the reorganization process is
- complete.
-
- 28-1 Text files heading, paragraph 3: change "255" to read "4000".
-
- 33-2 Paragraph 2, point 5 ("Print out file definition") to 6 and
- insert new Point 5: "Save the file definition".
- Paragraph 7: add sentence to end "Remember that passwords are
- case sensitive.".
-
- 33-30 Paragraph 5, change "click the * button (for multiplication) and
- then type 1.01" to read "click the + box (for addition) and then
- type 1".
- Paragraph 6, change example to read: "Interest_rate =
- Interest_rate + 1".
- Paragraph 7, change "multiply the value in each selected
- Interest_rate field by 1.01" to "add 1 to the value in each
- selected Interest_rate field.".
-
- 33-32 After the example in Paragraph 5, add "You may not be able to
- see the entire report line in the window due to its size. You
- will, however, be able to scroll through the entire line using
- cursor keys so you may view or edit it.".
-
- 34-6 Under "Utilities Directory List" change "KEYS: CTRL + D" to read
- "CRTL + L".
-
- 34-8 Menu Selection.
- Add:
- F1 HELP
- Change:
- ALT + F2 DML Edit
- CTRL + Y Utilities Status File
- CTRL + Z Utilities Status System
-
- 34-9 At bottom of page, change "SHIFT+ENTER" to read "CTRL+ENTER"
-
- Volume 2 Form Designer, Programming Language and Applications Guide
- --------
- 10-1 Point 2 (bottom of page): all after "report."
-
- 10-2 Insert new point 12: "Use Define SB Links to link the form's
- database files.".
- Change existing point 12 to 13.
-
- 17-70 Change "where nexpr - 1 = 1" to read "where nexpr - n = 1".
-
- 17-70 The significance of the type parameter in the financial
- to functions FN fv, FN nper, FN pmt, FN pv, and FN rate is
- 17-73 reversed. The correct significance is:
-
- 0 Computes for end of month
- 1 Computes for beginning of month
-
- 17-120 Under MODIFY, delete reference to "IXU"
- add: "NOTE: This command cannot be used to modify an indexed
- field or to add an index to a field.".
-
- 17-133 Under "Comments," change "param 10" and "param 11" to read
- "param 12" and "param 13" respectively, and insert:
- param 10: Chop (0 for OFF, 1 for USE)
- param 11: CR/LF (0 for conversion, 1 for NO conversion)
-
- 17-148 Delete text in "Syntax" section and replace with the syntax below
- and
- 18-6 Paragraph 14, showing the syntax for the use of the PRINT
- command, delete and change to read:
-
- PRINT CURRENT [PAGE/ALL[USING nexpr1 ...nexpr7]]/FILE
- [PAGE/ALL[USING nexpr1 ...nexpr7]] sbfname [INDEX indexname]
- [DESCENDING][WHERE conditions/ASK]/[expressionlist]
-
-
- ===============================================================================
- END OF README.TXT
- ===============================================================================