|
|
#121 |
|
Moderator
|
ABANDON
E r g e b n i s / R e s u l t
Displays the Open Access Abandon message B e s c h r e i b u n g / D e s c r i p t i o n ABANDON displays the Open Access 'Abandon Changes' message box. The developer does not have do anything but call the routine. It returns a true or false value. S y n t a x Code:
boolean = call ('ABANDON')There are no parameters for this procedure R e t u r n s A boolean value is returned. TRUE = the user has pressed F10 to abandon FALSE = Escape has pressed B e i s p i e l / E x a m p l e Code:
attach 'ERRORS'
b = call('ABANDON')
if b = true
put 'Abandoning the changes'
else
put 'Carry on editing the record'
end if
detach 'ERRORS' |
|
|
|
|
|
#122 |
|
Moderator
|
CLEARERR
E r g e b n i s / R e s u l t
Resets the Open Access errornumber B e s c h r e i b u n g / D e s c r i p t i o n This procedure resets the Open Access error number and is for use with ERRORS OFF & ERRORS ON code. I have found a couple of places where the Open Access error number is not correctly reset when you trap an error using ERRORS OFF. This function forces the error number to zero. S y n t a x Code:
bool = call ('CLEARERR')There are no parameters for this procedure R e t u r n s The procedure returns a Boolean or True/False value. TRUE - the procedure worked correctly. FALSE - a problem occurred. B e i s p i e l / E x a m p l e Code:
attach 'ERRORS'
errors off
insert db ! example of a potential problem statement
enum = errornumber
a = call("CLEARERR")
! the errornumber has now been reset to zero.
errors on
detach 'ERRORS' |
|
|
|
|
|
#123 |
|
Moderator
|
HELPA
E r g e b n i s / R e s u l t
Forces the help window for the application to appear. B e s c h r e i b u n g / D e s c r i p t i o n The HELPA function will cause the current application help window to appear. You would set the application help file and number using the Open Access statements HELPFILE and HELPNUMB. S y n t a x Code:
bool = call ('HELPA')There are no parameters for this procedure R e t u r n s A boolean value. B e i s p i e l / E x a m p l e Code:
attach 'ERRORS'
x = call ('HELPA')
detach 'ERRORS'HELPS |
|
|
|
|
|
#124 |
|
Moderator
|
HELPS
E r g e b n i s / R e s u l t
Forces the help window for the system to appear. B e s c h r e i b u n g / D e s c r i p t i o n The HELPS function will cause the current system help window to appear. S y n t a x Code:
bool = call ('HELPS')There are no parameters for this procedure R e t u r n s A boolean value. B e i s p i e l / E x a m p l e Code:
attach 'ERRORS'
x = call ('HELPS')
detach 'ERRORS'HELPA |
|
|
|
|
|
#125 |
|
Moderator
|
SETERR
E r g e b n i s / R e s u l t
Displays an Open Access error message B e s c h r e i b u n g / D e s c r i p t i o n This procedure displays a standard Open Access error message at the top of the screen. The user is prompted to press <do:F10> or <undo:Esc> to continue. Having trapped an error message such as 'Printer not online', the developer can display an error message entirely under program control. S y n t a x Code:
bool = call ('SETERR' , errornumber , string)errornumber - The first parameter is an error number (see below.) string - The second parameter is a replacement string that is inserted in certain error messages. Those messages below that include a $ will have the replacement string inserted at the $. Passing a replacement string to a message that does not use it will not cause any problems. Some of these errors messages are not applicable, however a great many will be of use to developers. Error Message Number 0 /* System Error */ 1 /* Error in Boolean Conditional */ 2 /* Exponential Overflow */ 3 /* Missing Parenthesis */ 4 /* Bad constant or fieldname */ 5 /* Numeric Overflow */ 6 /* Too Many Parentheses */ 7 /* CRC Error/Disk May Be Write Protected */ 8 /* No Room for Scratch File */ 9 /* No Room in File $ */ 10 /* No Room on Volume $ */ 11 /* File $ Already Exists */ 12 /* File $ Not Found */ 13 /* $ of Wrong Type */ 14 /* Field $ Not Found */ 15 /* Duplicate Field $ */ 16 /* Access Violation */ 17 /* Program Confused */ 18 /* Illegal Operation */ 19 /* Bad User Data */ 20 /* Implementation Restriction */ 21 /* Too Many Files */ 22 /* Too Many Fields */ 23 /* Error in Join Clause */ 24 /* Missing FROM Clause */ 25 /* Type Conflict of Operands */ 26 /* Missing Delimiter */ 27 /* Database $ Corrupted */ 28 /* Records are Locked */ 29 /* Range Error */ 30 /* Illegal Character (Non-Numeric) */ 31 /* Not Enough Memory */ 32 /* Error in Mask $ */ 33 /* Invalid ALLOW Option */ 34 /* Record updated by another user - Try again */ 35 /* End of File $ */ 36 /* Records will not fit on printer page */ 37 /* Not enough memory for entire file. Continue? */ 38 /* Error in writing file $ */ 39 /* Error in opening file $ */ 40 /* Mask $ has not been set up correctly */ 41 /* Records will not fit on printer page */ 42 /* $ is not a key field */ 43 /* Error In Expression $ */ 44 /* Error during read of file $ */ 45 /* Error during evaluation of mask $ */ 46 /* Too Many Virtual Fields */ 47 /* Unknown function $ */ 48 /* Bad Argument $ */ 49 /* Too Many Functions */ 50 /* Missing exponent */ 51 /* No Records Found */ 52 /* Mask $ Read Error */ 53 /* Range Error */ 54 /* Unable to output, hardware problem */ 55 /* Value for field must be entered */ 56 /* Token Too Long */ 57 /* Bad Record Count */ 58 /* Missing Quote */ 59 /* Missing Separator */ 60 /* Bad Field */ 61 /* Bad Date */ 62 /* Bad Integer */ 63 /* Bad Decimal */ 64 /* Cannot Divide By Zero */ 65 /* Output device not initialized */ 66 /* No printer information records found */ 67 /* Output device already active */ 68 /* No output device on-line */ 69 /* Error in $ detected, Macro Command aborted */ 70 /* Writing to Input file $ not allowed */ 71 /* Reading from Output file $ not allowed */ 72 /* Character Buffer Overflow */ 73 /* Wrong Version of $ */ 74 /* Communication Failure */ 75 /* Error Writing to Volume $ */ 76 /* Record Deleted */ 77 /* Duplicate Value in Unique Key $ */ 78 /* Not sorted correctly for Report Form */ 79 /* Error Reading Volume $ Directory */ 86 /* No Room On Volume $ */ 87 /* No Volume $ Found */ 88 /* Value Not Found in File $ */ 89 /* No File Open */ 90 /* Illegal Operation to Serial Device $ */ 91 /* Serial Device $ Not Allowed */ 92 /* Illegal File Name "$" */ 93 /* Error lengthening file (disk full?). Please run Fix_File. */ 94 /* Mask $ not found */ 95 /* Bad input format */ 96 /* Invalid key word */ 97 /* Record $ not found in Printer Information file */ 98 /* File Name $ too long */ 99 /* Text Line is too long */ 100 /* An area has already been selected */ 101 /* No screen mask file defined for $ */ 102 /* No records in file */ 111 /* File $ already in use */ 112 /* Too many Macros already executed. */ 113 /* Macro $ already active. */ 114 /* No options in the $ menu */ 115 /* The module is not in $ */ 116 /* Value for field must be entered. Press <do> to accept zero. */ 117 /* Warning: Numbers > 2.147 billion set to 0. Use type decimal. */ 118 /* Record is too large or field is size zero. */ 119 /* Aggregate functions only allowed in totals and group headers. */ 120 /* Must specify all volume nicknames to join files of same name */ 127 /* Too Many Ranges and/or Values to Search For */ 128 /* Query Too Complex */ 129 /* Improper Join Conditions */ 130 /* Maximum number of characters exceeded */ 131 /* Maximum number of lines exceeded */ 132 /* Maximum number of menu levels exceeded */ 133 /* Wrong type field in record #$ */ 200 /* Error in Memory Allocation */ 201 /* Illegal Memory Pointer */ 202 /* Illegal Access of Memory */ 203 /* Memory Corrupted */ 204 /* Memory Not Available */ 205 /* No room for more conversion entries */ 206 /* Memory <-> Disk IO Error */ 207 /* End of Memory Space */ 208 /* Overrun error */ 209 /* Parity Error */ 210 /* Framing Error */ 211 /* Break */ 212 /* Buffer overflow - Host not responding to XOFF */ 213 /* Timeout error */ 214 /* Communications port is already active */ 215 /* Communications Failure */ 216 /* INTERRUPTED */ 217 /* Wrong version of SPI.EXE */ 228 /* Bad User Data : $*/ 231 /* Illegal action for this option.*/ 231 /* Illegal action for this option.*/ 298 /* Reached maximum number of characters.*/ 299 /* Bad Time Constant*/ 300 /* Could not index $ help file*/ 301 /* Help Number $ Not Found*/ 302 /* Help file $ Not Found*/ R e t u r n s The procedure returns a Boolean or True/False value. TRUE - the procedure worked correctly. FALSE - a problem occurred with the parameters. B e i s p i e l / E x a m p l e Code:
! attach the errors utility
attach 'errors'
! open a print device and trap any error conditions
errors off
printer is ''
errors on
! did the user press escape ? This is the 'Output not initialised'
if errornumber = 65
! display the error message (65) and a blank replacement string
x = call ('SETERR' , 65 , '')
end if
! remove utility from memory
detach 'errors'CLEARERR |
|
|
|
|
|
#126 |
|
Moderator
|
EXISTS
E r g e b n i s / R e s u l t
Checks for the existence of a file B e s c h r e i b u n g / D e s c r i p t i o n The developer can pass a nickname:filename to this routine and the routine checks for the existence of the file in the nickname specified. This lets you prompt a user for a file name and then check to see if it exists. S y n t a x Code:
value = call('EXISTS' , filename , scope)filename - is any filename. A nickname may precede the filename. scope - A boolean value that determines where to look for the filename. If the scope is FALSE, then only the nickname / volume is searched for the file. If there is no nickname, then the first searching order is used. If the scope is TRUE, then the nickname is searched first and then each of the searching orders. R e t u r n s An integer value. -1 = Parameter error 0 = File does not exist 1 = File exists B e i s p i e l / E x a m p l e Code:
attach 'FILE'
put 'Please enter a file' , do newline
a = ''
get a
if call('EXISTS' , a , true) = 1
put 'The file exists'
end if
detach 'FILE'GET_DB |
|
|
|
|
|
#127 |
|
Moderator
|
GET_DB
E r g e b n i s / R e s u l t
Prompts the user for a database filename. B e s c h r e i b u n g / D e s c r i p t i o n This procedure prompts the user for a database file name. Only .DF .IF and .MF files are accepted and must exist in the Open Access searching order. The user may press <search:F4> to obtain the standard file search window. Delete, Rename and Copy are allowed from inside the <search:F4> window. A default filename may be passed to the routine. This is displayed to the user, who may press <do:F10> to accept it or type a new filename or press <search:F4>. S y n t a x Code:
string = call('GET_DB' , default_filename)default_filename - The procedure accepts a default filename that will be used in the filename prompt. This parameter is of type STRING and can be blank. An invalid parameter, for example, calling the procedure with a date, will cause an error message to be displayed and a zero length string to be returned. R e t u r n s This procedure returns a variable of type STRING. The return value is a nickname:filename string. The file extension will not be returned, so that a user can enter a index file (.IF) and the true database name would be returned. B e i s p i e l / E x a m p l e Code:
attach 'FILE'
a = 'MYFILE.DF'
a = call ("GET_DB" , a)
put a
detach 'FILE'DISP_DB |
|
|
|
|
|
#128 |
|
Moderator
|
CURS_OFF
E r g e b n i s / R e s u l t
Turns off the cursor B e s c h r e i b u n g / D e s c r i p t i o n Turns the cursor off. This is a useful routine to call to remove the 'stray' cursors that sometimes appear after using a Screen Form. It is not possible to turn off the cursor when in an input field. S y n t a x Code:
bool = call ('CURS_OFF')There are no parameters for this procedure R e t u r n s The procedure returns a Boolean or True/False value. TRUE - the procedure worked correctly. FALSE - a problem occurred. B e i s p i e l / E x a m p l e Code:
attach 'KEYBOARD'
a = call ("CURS_OFF") ! the cursor is now off
detach 'KEYBOARD'CURS_ON |
|
|
|
|
|
#129 |
|
Moderator
|
CURS_ON
E r g e b n i s / R e s u l t
Turns on the cursor B e s c h r e i b u n g / D e s c r i p t i o n Reverses the effect of CURS_OFF and re-displays the cursor. Using GET in Programmer will do this anyway. S y n t a x Code:
bool = call ('CURS_ON')There are no parameters for this procedure R e t u r n s The procedure returns a Boolean or True/False value. TRUE - the procedure worked correctly. FALSE - a problem occurred. B e i s p i e l / E x a m p l e Code:
attach 'KEYBOARD'
a = call ("CURS_ON") ! the cursor is now on
detach 'KEYBOARD'CURS_OFF |
|
|
|
|
|
#130 |
|
Moderator
|
FLUSHBUF
E r g e b n i s / R e s u l t
Clear the Open Access keyboard buffer B e s c h r e i b u n g / D e s c r i p t i o n Clears the keyboard input buffer. This is most useful when about to ask a very important question like 'Is it alright to delete these' You would call this routine before the question to prevent a user from typing <do:F10> in advance. S y n t a x Code:
bool = call ('FLUSHBUF')There are no parameters for this procedure R e t u r n s The procedure returns a Boolean or True/False value. TRUE - the procedure worked correctly. FALSE - a problem occurred. B e i s p i e l / E x a m p l e Code:
attach 'KEYBOARD'
a = call ("FLUSHBUF") ! clear the entire keyboard buffer
put "Are you sure you want to delete everything ?"
key get x
:k_do: purge db
end keys
detach 'KEYBOARD' |
|
|
|