Home

Here

image

Contents

1. ta Some databases do not actually delete the record from the database Instead they set a flag that the record is to be deleted the record is not actually deleted until the database is compressed See Chapter 14 for database specific issues such as this WebBase User s Guide 71 Chapter 6 ODBC amp SQL The WebBase carID variable would have been previously determined either by an explicit entry by the user or as the result of a SELECT statement 78 WebBase User s Guide WEB 52 htf Files ExperTolligence Chapter 7 WebBase is configured to process any file with an extension of htf htm or html It is recommended that files containing WebBase macros and variables use the htf file extension Any files containing pure HTML syntax should use the htm or html file extensions Chapter 2 presented an example of a file in which WebBase was used to perform a database query retrieve the results from the database and determine how the data should be displayed at the browser Because of the importance of forms to WebBase this example will be reviewed again 7 1 Editing htf Files WebBase htf files are text files that can be created with a text editor or with an HTML editor The WebberActive HTML editor provided with WebBase is a full featured HTML editor that is also customized for use with WebBase You can insert any of the WebBase macros into your form being edited as easily as a
2. It may not always be desirable to have all of the fields in a command line be used in the creation of the WHERE clause nor will all the tests be the equal operator WebBase has taken this into account by providing a scheme for encoding a suffix on the variable name field to alter the way in which the WHERE variable is constructed Here is another example The lt INPUT gt statements within the lt FORM gt construct requesting variable values are lt INPUT TYPE TEXT NAME ID GT VALUE 1234 gt lt INPUT TYPE TEXT NAME NAME SLIKES VALUE George gt The command line generated using these two input variables and their values is shown below Note that the browser has performed the necessary encoding on the non alphanumeric characters e g the and GET test htf I1ID 3EGT 12348names3ES25LIKES25 Georges codes3EXX wXyZ The resulting WHERE variable is WHERE ID gt 1234 AND name LIKE Georges In this example a gt greater than test was done on the ID field and a LIKE case insensitive comparison test on the name field using wild carding The variable name suffixes that can be used to modify a 7 WHERE clause their functions and an example of their usage are e EQ e g ID EQ 123 gt ID 123 adds the field to the WHERE clause using an equal operator the default if no suffix is specified e EQN
3. f 23 Jkl 2 strl replaceFrom to with startingAt gt akl returns the receiver with the elements from the start index first argument to the end index second argument replaced with the elements in the specified collection third argument The replacement elements are selected starting at the index specified in the fourth argument replaceFrom to with startingWith e g set newCltn eight nine ten parseAt f 1 2 newCltn 2 cltnl replaceFrom to with startingWith nine ten three f 2 3 ikl 2 strl replaceFrom to with starting With akl returns the receiver with the elements from the start index first argument to the end index second argument replaced with the elements in the specified collection third argument The replacement elements are selected starting at the index specified in the fourth argument This is almost the same as replaceFrom to with startingAt except that it has improved error handling replaceFrom to withObject e g f 1 2 four cltnl replaceFrom to withObject cltnl gt four four three f 2 3 L strl replaceFrom to withObject strl gt aLL WebBase User s Guide returns the replacement element third argument The receiver is modified by replacing the elements from the start index first argument to the end index second argument with the element specified in the third argument e reverse e g f cltnl reverse
4. Example 8 17 forRow Macro set counter 1 return no more than 10 answers print the Name and Address fields from the database forRow aRow on someAnswers max 10 Entry number counter is Name at Address set counter counter 1 forRow htf htf The Atf macro prevents values surrounded by curly braces in HTML from being processed by WebBase This is useful if you want to include JavaScript within your form and not have WebBase try to process it Another use of this macro is to construct your own WHERE clause from information provided via FORM INPUT by creating the clause as the value of a hidden variable The example below is extracted from Basic Example 9 that is accessed via the WebBase WebWizard Example 8 18 htf Macro form 1 lt PRE gt lt FORM METHOD GET ACTION Wbact9 htf gt lt B gt Name lt B gt lt INPUT NAME name SIZE 32 gt lt B gt Category lt B gt lt SELECT NAME category gt lt OPTION gt Manager lt OPTION gt Programmer lt OPTION gt Operator lt SELECT gt lt B gt Minimum Age lt B gt lt INPUT NAME age VALUE 21 SIZE 3 gt lt B gt Work lt B gt lt SELECT NAME work gt lt OPTION gt Easy lt OPTION gt Moderate lt OPTION gt Hard lt SELECT gt lt B gt Misc lt B gt lt INPUT NAME misc gt lt INPUT TYPE HIDDEN NA
5. set myToken WebBaseID App will generate a local variable called myToken whose value will be something like App W14263151E161808318465B The forms designer can then set this local variable to be the name of the user variable dictionary using set SuserName myToken Any user variables created via the setUser macro within this form will automatically go into this user variable dictionary This local variable is also passed to any other forms that will be displayed either via a FORM statement anchor or redirect2macro the redirect2 macro supports passing arguments the redirect does not Those subsequent forms would set this local input variable to be the name of the user variable dictionary These forms would then have access to the user variables created in the first form They would also be able to modify or create new user variables Because there is only one dictionary of user variables any form that receives the local variable myToken and sets it to be the user variable dictionary name can access any of the user variables in the dictionary User Variable Example The WebBase WebWizard Basic Example 7 shows how user variables can be used to pass information between two forms The first form requests the user to enter several pieces of information some of which are required or have specific requirements as to the contents The second form verifies that all input requirements have been met If any requirements are lacking the
6. 1 Is there an alias for this name at this particular IP address 2 Is there an alias for this name 3 Is this a legitimate directory name within the default directory path Editing Aliases WebBase only reads aliases like extensions and parameters at startup If an alias is added changed or deleted WebBase must be stopped and restarted for the change to take effect To create and or edit the WebBase aliases perform the following steps 1 Start WebBase and open up the WebBase WebWizard by entering the URL http 127 0 0 1 lt port gt wbhwizard The lt port gt is the PortNo parameter If port 80 is used the lt port gt portion of the above URL does not have to be used 2 Select the Registration Database anchor 3 From the pull down list select HKEY_LOCAL_MACHINE and then press the OPEN button 4 Select the Open anchor next to the SOFTWARE key WebBase User s Guide 5 Select the Open anchor next to the ExperTelligence Inc key 6 Select the Open anchor next to the WebBase key 7 Select the Open anchor next to the version number e g 4 10 8 If the key Aliases does not exist create it by selecting the Add New Key anchor and entering Aliases as the key name Remember that this name is case sensitive 9 Select the Open anchor next to the Aliases key All of the WebBase aliases currently defined and their v
7. 3086 returns an integer which is the receiver shifted left the number of bit positions specified by the argument if the argument is positive or shifted right the number of bit positions specified by the argument negated if the argument is negative factorial e g f 8 factorial gt 40320 returns the factorial of the receiver gcd e g f 180 255 gcd gt 15 returns the greatest common divisor between the receiver and the argument intSqrt e g f 144 intSqrt 12 returns the integer square root of the receiver lcm e g f 180 255 Icm gt 3060 returns the least common multiple between the receiver and the argument printOn base e g set strm String new WriteStream on f strm 3 25 printOn base f strm contents gt 3r221 appends the ASCII representation of the receiver with radix specified by the second argument to the stream specified in the first argument printOn base showRadix e g set strm String new WriteStream on f strm 3 false 25 printOn base showRadix f strm contents gt 221 appends the ASCII representation of the receiver with radix specified by the second argument to the stream specified in the first argument printPaddedTo e g f 5 123 printPaddedTo gt 123 returns a string representing the receiver padded on the left with blanks to be at least the number of characters as specified in the argument printPaddedWith to base e g f 6 9 123 printPaddedWi
8. 199 addSeconds 219 addTime 216 after 199 Aliases 42 Aliases 45 58 303 305 align parameter 155 align 187 alignDollar 172 187 236 alignLeft 188 alignLeft fill 188 alignRight 188 alignRight fill 188 Anchor 5 Anchors 120 156 AND operation 170 and 176 AppDirectory parameter 38 appendFilename 188 Application parameter 38 arcCos 173 arcSin 173 arcTan 173 argList 244 argString 244 asArray 182 205 asArrayOfSubstrings 188 asArrayOfSubstringsSeparatedBy 188 asBoolean 176 asBoolean 173 189 210 asCapitalized 189 ascending 199 asCharacter 176 189 208 asciiValue 208 asCodedHtml 189 asCookieDateTime 219 asDate 189 219 asDateTime 219 224 asDateTime12 219 224 asDateTime12withPicture 219 asDateTime12WithPicture 224 asDateTime 24 219 224 asDateTime24withPicture 219 asDateTime24WithPicture 224 asDateTimewithPicture 219 asDateTimeWithPicture 224 asDatewithPicture 219 asDateWithPicture 224 asDoubleQuoteString 189 asFieldName 118 189 asFieldNameName 118 189 asFloat 176 178 179 189 WebBase User s Guide asHeaderDateTime 219 asHTF 95 asHTF 244 asInteger 173 189 208 asKeys 205 asLogFileTimeStamp 220 asLowercase 190 208 asMailDateTime 220 asNonEmptyString 190 224 asNumber 173 190 asOptions 190 199 asOptions field 199 asOrderedCollection
9. 250 tableSource user password 250 table Width 239 tan 176 text 248 text fields 74 109 time 222 225 timeFromString 222 timeFromString12 223 timeFromString24 223 timer macro 110 247 timerQueueSQL 248 timesTwoPower 176 title built in command 27 titleString built in command 27 today 216 Total View Menu Option 54 totalSeconds 218 Trace Incoming Headers Menu Option 60 Trace Mail Commands Menu Option 289 Trace Outgoing Headers Menu Option 61 Transfer Encoding 309 transpose 181 trimBlanks 197 True 209 truncate 235 truncated 176 181 truncateTo 176 U Uniform Resource Locator See URL UPDATE 7 76 82 Upgrade 309 upTo 197 233 upToWhitespace 233 URL 7 84 207 263 urlArgString 207 User DSN 29 User variable dictionaries 159 User variables 52 101 106 115 124 159 userAgent 248 User Agent 121 280 309 users 244 V V32BAS20 dll 13 V32THK20 dll 13 WebBase User s Guide V32U202 dll 13 V32VM20 dll 13 V32VM20 exe 13 26 valid 229 validDrive 229 validFile 229 validHtmlChar 209 value 204 242 value 242 valueAt 239 values 243 Variable indirection 103 Variable Name Suffixes 259 Variable Precedence Order 115 163 variableExists 248 vars 248 Version 47 49 58 Via 310 volumeLabel 230 W Warranty ii WBSetup exe 12 WBUpdate exe
10. 64 log 174 LogDirectory parameter 19 36 251 294 LogFormat parameter 36 62 LogFormat Parameter 251 Logging 56 251 Mail 284 290 logical AND 170 logical OR 170 logRecord 247 M Macro format 83 Mail See E Merge mail macro 291 mailBCC 296 mailCC 296 mailDate 296 Mailer 284 Mailer Menu Option 290 mailFrom 296 mailID 296 mailSubject 296 mailTo 296 makeCurrent 229 map 184 map for 184 map with 184 max 185 max 174 181 204 209 212 217 222 225 Max Forwards 309 Message 9 321 Index Method 10 Microsoft Access 272 Microsoft Excel 277 millisecondClockValue 218 milliseconds built in command 27 mime 247 min 185 min 174 181 204 209 212 217 222 225 minutes 217 222 monthIndex 212 222 monthName 212 222 monthNameFromString 215 monthNames 215 Multiple Domains 43 58 305 N name 225 247 nameOfDay 215 nameOfMonth 215 negated 174 181 negative 174 new 202 207 243 New Window Menu Option 63 new 202 243 newAscending 203 newDay month year 215 newDay year 215 newDescending 203 newFile 227 229 newFile in 227 next 233 235 next 231 nextCookield 247 nextInteger 231 nextLine 232 nextMatchFor 232 nextPut 234 nextPutAll 234 nextWord 232 nonempty 194 nonempty parameter 156 not 210 notEmpty 185 206 notNil 1
11. Edit Menu Options Copy this menu option provides the same functionality as described for the Late Breaking News Window Find this menu option provides the same functionality as described for the Late Breaking News Window WebBase User s Guide 53 Chapter 5 WebBase Windows 54 Find Again this menu option provides the same functionality as described for the Late Breaking News Window Heartbeat If this option is selected a Heartbeat Window is opened This window is described later in this chapter The keyboard shortcut lt ctrl gt H press the Ctrl key and the H key down at the same time can also be used to open a Heartbeat window Total View If this option is selected a Total View window is opened This window is described later in this chapter The keyboard shortcut lt ctrl gt T press the Ctrl key and the T key down at the same time can also be used to open a Total View window Options Menu Options Enable Transactions Pane This is a toggle on off option If the status line is enabled default a check mark is displayed next to the menu option If the status line is disabled no check mark is displayed If the user turns the option off the status line is displayed in gray and only a copyright statement is displayed within the status line More information on the status line is presented later in this chapter Open Transactions Window If this option is selected a WebBase Transactions Service Windo
12. LogFormat gt 2 returns a dictionary containing the name value pairs of the receiver e includesKey e g f Parameters SOFTWARE ExperTelligence Inc WebBase 4 10 RegistrationDatabase localMachine at includesKey true returns true if the receiver contains a subkey named by the argument otherwise false Note that this finds keys within a registration database To determine if a name in a name value pair is in a registration database use f Directory regDB entryValues includesKey e keyName e g f regDB keyName gt SOFTWARE ExperTelligence Inc WebBase 4 10 Parameters returns the name of the receiver up to but not including the top level registry key The keyName for any top level registry key is a numeric value It is not possible to rename any of the keys in the System Registry e keys e g f SOFTWAREExperTelligence Inc WebBase 4 10 RegistrationDatabase localMachine at keys gt OrderedCollection Parameters Variables Extensions Aliases returns a collection of the keys of the receiver including any Windows reserved keys e printHierarchyOn e g set strm String new YWriteStream on f strm SOFTWARE ExperTelligence Inc WebBase 4 10 RegistrationDatabase localMachine at printHierarchyOn f strm contents gt lt see below gt returns the receiver after adding its hierarchical representation to the stream specified in the argument The default v
13. WebBase User s Guide Changing the Way the World Uses the Internet Version 4 10 Build 56 June 1997 E ExperTelligence Limited Warranty on Media and Materials If you discover physical defects in the media on which the software is distributed or in the manuals distributed with the software ExperTelligence will replace the media or manuals at no charge to you provided you return the item to be replaced with proof of purchase to ExperTelligence or an authorized ExperTelligence dealer during the 90 day period after you purchased the software In some countries the replacement period may be different check with your authorized ExperTelligence dealer ALL IMPLIED WARRANTIES ON THE MEDIA AND MANUAL INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE LIMITED IN DURATION TO NINETY 90 DAYS FROM THE DATE OF THE ORIGINAL RETAIL PURCHASE OF THIS PRODUCT Even though ExperTelligence has tested the software and reviewed the documentation ExperTelligence MAKES NO WARRANTY OR REPRESENTATION EITHER EXPRESS OR IMPLIED WITH RESPECT TO THIS SOFTWARE ITS QUALITY PERFORMANCE MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE AS A RESULT THIS SOFTWARE IS SOLD AS IS AND YOU THE PURCHASER ASSUME THE ENTIRE RISK AS TO ITS QUALITY AND PERFORMANCE IN NO EVENT WILL EXPERTELLIGENCE BE LIABLE FOR DIRECT INDIRECT SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT IN THE SOFTWARE OR ITS DOCU
14. e skipCookies By default WebBase will always try and establish a cookie connection with the browser If it receives a cookie from the browser it will return that cookie on the next write If it does not receive a cookie it will generate a new one and send it to the browser If this variable is set to true WebBase will not send a cookie to the browser regardless of whether one was received or not e skipHeaderComment When WebBase processes a file it accumulates all the information to be returned to the browser in a stream Once the processing is completed the header information is created and added to the start of the stream By default WebBase also includes a comment line at the start of the stream indicating that the stream was generated by WebBase as well as the current date and time The comment information is stored in the comment variable This starting comment in the HTML returned to the browser is only seen if the user does a View Source at their browser If this variable is set to true the comment value is not included in data returned to the browser e source the name of the data source to be used by the sq macro This can be created as a global user or local variable or overridden explicitly in the sq macro using the source keyword argument It defaults to an empty string e sqlBufferSize the maximum buffer length for ODBC to use to return data from the database to WebBase This can be created as a gl
15. gt 10 returns the denominator of the receiver For most numbers this is 1 For fractions it will be the denominator within the fraction even e g f 11 even gt false returns true if the receiver is an even number otherwise false WebBase User s Guide e exp eg f 5 exp gt 148 413159 returns a float that is the exponential of the receiver e floor e g f 12 7 floor 12 f 12 3 floor gt 12 returns an integer that is rounded down to the preceding integer from the input e format e g set phoneNumber 1234567890 f 000 000 0000 phoneNumber format gt 123 456 7890 returns a string in which any digits in the control string argument have been replaced with the next corresponding character from the receiver all other characters in the control string print as entered Processing stops when the end of the receiver or control string is reached There must be a good match between the receiver and control stream In the example shown above if the variable phoneNumber did not have an area code the string returned would be 456 789 0 which is probably not what was intended e integerCos e g f 0 3 integerCos gt 100 returns the integer cosine of the receiver angle measured in degrees scaled by 100 e integerSin e g f 3 6 integerSin gt 7 returns the integer sine of the receiver angle measured in degrees scaled by 100 e In e g f 17 In gt 2 83321334 returns the natural log of the recei
16. lt port gt dirSpec fileName Type argl vall amp arg2 val2 arg3 val3 Each command line argument and value are separated by an The first argument value pair following the filename is preceded by a All subsequent argument value pairs are separated from the previous by an amp There are several ways in which command line arguments can be created The most common way to create command line arguments is to set up an HTML lt FORM gt that includes one or more lt INPUT gt statements Some lt INPUT gt statements allow the user to make or enter selections such as text field or check boxes Other lt INPUT gt statements are buttons which signal that a user wants some type of action to be taken And finally other lt INPUT gt statements allow hidden data to be passed to the next form to be invoked WebBase User s Guide For example a user might create a form to enter in a name address city state and zip There would be 2 buttons one to create a new record and the other to cancel Lastly there might be a hidden variable passed along that was an ID previously entered by the user A FORM construct for these input fields might look like lt FORM METHOD GET ACTION form2 htf gt Name lt INPUT TYPE TEXT NAME name SIZE 15 VALUE gt Address lt INPUT TYPE TEXT NAME address SIZE 15 VALUE gt City lt INPUT TYPE TEXT NAME city SIZE 15 VALUE State lt INPUT TYPE TEXT NAME state SIZ
17. scccsseccesseecsseecssceceseeceseecesaeecsseecsseecseecsseeeesseecsaeecsaeecsseesesaeessaeeesaeers 47 Meni Opionst Sith a te San As A ls RR I Ri Pe ERs 48 2 2 WebBase Server Wind Wisin sac candause lasses a a tac sandaahe E he S AE AE 49 WebBase Server Window Menu Bat ccccssecceesescceeeesneeeeeeceeceesaeeeceenaeeesseaeeeeeseaeeecsenaeeeeseneeeeseeeeeess 50 WebServer Menu Options cseeseccsssecesseecsseecsseecsseecesaeecsaeecsscecsseecsseecesaeecsseecsseesseeseseeeesaeeesaeers 50 Edit Menu Options str AIR Ian 53 Options Men Option S sc oster foros sath intelecto Ta edee eepe Teine bene 54 Help Menu Optimista 57 WebBase Server Window Status Line oooooocccnnonccccononcnncnonnnnnononrnnnonnnono con n nro ron nnnnnnnnnrnr nan nn nrnnnnnnnnnnnnnnnns 57 WebBase Server Window Text Display cescesscecesseeesseecsneesscecssaecesaeecsaeecseecsseeeesaeessaeesseessneeeesaes 58 5 3 WebBase Transactions Service Window ccccsscccessssceeeseneeeceseneeeceeceeeeenaeecesenaeeecesaeeseneeeeseetaseeeneanees 58 WebBase Transactions Menu Bat cc ccccsssscceeeenceeeeesneeeeeeeeecessaeeeceeeeeecseaeeecseeaeeeesesaeeeeseneeeeesnneeeess 59 WebBase Transactions Text Window ccccsssccceesnseeeeesneeeesenceeecnsaeeecesnaeeecesaeeeeeseaeeeessnaeeeeneaneeeeneeeeess 62 5 4 WebBase Total View Window cccscccccsssseceessseeeeesnceeeceeaeeecessneeecseaeeeesesaeeeesenaeeeceeneeeeseeaeeeeeesteesennee
18. set msg error messageText exit false false msg errorProtect set success pass PASSWORD return true success Example 8 7 The second called file logger htf comment We were called with three variables id the user s id trans some text to be logged to the log database dbase the ODBC source name of the log database We will not be returning anything and don t care if any errors occur during the database transactions but we will wrap an errorProtect around th ntire process so that if any errors do occur we will immediately skip out without bothering WebBase to return error data comment errorProtect sql to ignore source dbase INSERT INTO LOGTABLE ID WHEN WHAT VALUES id sql true SsdateTime trans sql true sql errorProtect case lt exp gt match lt mArg gt otherwise case The case macro causes control to be transferred to one of several match clauses Each case macro must have at least one match clause the otherwise clause is optional The exp expression argument is required with the case statement the mArg argument is required with 88 WebBase User s Guide each match statement The case macro evaluates exp and compares it to the values for each associated match clause When the match clause value equals the case value the text following that match clause until the next match otherwise or case clau
19. 1 0 lt CrLf gt 23 lt gt out Message ID lt 100127 3513600003 ExperTelligence com gt lt CrLf gt 22 lt gt out HTTP 1 0 200 OK lt CrLf gt 21 lt gt 3 8 127 0 0 1 14 Mar 1997 10 52 05 0800 GET dateTime HTTP 1 0 200 496 Mozilla 3 0 Win95 I Status gt Show Server Status If this option is selected the status of the server is displayed in the Transactions Service window in the following form 36 lt gt 3 Fri 14 Mar 1997 1 0 54 31Pause Server gt active The 3 indicates that the WebBase server has processed 3 commands The 36 is the entry number within the WebBase Transactions Service window Status gt Show TCP IP Status If this option is selected the TCP IP parameters are displayed in the WebBase Transactions Service window in the following form the parameter values are dependent on the system configuration they are presented here for illustration only 53 lt gt 0 TCP IP Fri 14 Mar 1997 11 39 22 valid true port 80 descriptor 7 last return code 0 status Running on Windows 95 52 lt gt 0 TCP IP SoType gt 1 51 lt gt 0 TCP IP SoError gt 0 50 lt gt 0 TCP IP SoDebug gt false 49 lt gt 0 TCP IP SoRcvBuf gt 8192 48 lt gt 0 TCP IP SoSndBuf gt 8192 47 lt gt 0 TCP IP SoOobInline gt false 46 lt gt 0 TCP IP SoKeepAlive gt false 45 lt gt 0 TCP IP SoBroadcast gt false 44 lt
20. 135 formDirectory 135 FORMScache 135 FORMScacheHTML 135 Fraction 124 179 fullHostAddress 135 fullHostName 37 44 135 WebBase User s Guide GE 95 135 gfmt 135 eglobalVariables 136 globalVariablesHTML 136 gmt 136 GT 136 J headerVariables 121 136 headerVariablesHTML 121 137 heartbeatInterval 67 149 heartbeatMaxLines 67 149 heartbeatPostingEanble 67 heartbeatPostingEnable 150 heartbeatReplyTime 68 150 heartbeatResetTCP 68 150 heartbeatSound 68 150 heartbeatWindow 65 150 Yhost 137 inputVariables 137 inputVariablesHTML 137 lInteger 124 176 178 lastModified 150 LE 137 leftBrace 84 137 local 138 localVariables 138 localVariablesHTML 138 logEnabled 56 148 294 logRecord 138 LT 138 MailerStatus 294 JomailFullTrace 295 mailLogEnabled 290 294 mailMaxLines 286 294 mailPostingEnable 286 294 MailQueue 294 295 YmailTrace 295 max 150 Microsoft 312 Jomilliseconds 138 YmimeType 151 name 138 NEQ 139 Netscape 312 newAscendingList 139 203 newDescendingList 139 203 YnewList 139 J nextCookield 139 nextCookieID 160 NGT 139 NLT 139 Number 124 ODBCcache 139 J odbcCacheHTMLO 258 ODBCcacheHTML 139 ODBCadrivers 139 ODBCdriversHTML 140 ODBCsources 140 ODBCsourc
21. 182 205 asPairs 205 asPrintableHTML 190 asSeconds 210 216 220 224 associationAt 205 asSortedCollection 182 205 asSqlString 190 210 asStream 190 asString 170 asSymbol 190 asTime 190 220 asTimel2 220 asTime24 220 asUniversalTime 224 asUnsigned 176 asUppercase 190 208 asUseableHTML 190 asValues 205 at parameter 313 at 190 199 205 236 239 241 at put 190 199 205 241 atAllPut 183 atEnd 231 authDecode 191 208 265 authEncode 177 191 266 Authorization 308 authPassword 191 265 authUserName 191 265 authValid 191 265 average 183 B base64decodeFileTo 191 base64EncodeFile to 191 Basic Authentication 263 beep 244 beep for 244 before 200 Benefits 1 between and 173 181 204 208 210 217 220 bitInvert 177 bitShift 177 brace macro 84 Browser 5 Browser Caching 256 317 Index Build 47 49 58 build built in command 27 buildString built in command 27 Built in Commands 58 C Cache ODBC Connections Menu Option 56 Cache Control 308 cacheFreeForm 244 cacheFreeSource user 245 cacheMenultemCheck 245 Caching 256 calendarForMonth year 214 call macro 84 101 canAccept 245 canConnect user password 248 case macro 88 ceiling 173 CGI 3 5 10 changeModeOf to 226 characterConstant 191 Class 9 classCaddr 191 classesRoot 243 Clea
22. 1901 If the argument is negative the date will be computed before January 1 If the argument is positive the date will be computed for after January 1 1901 e fromString e g f May 6 1997 Date fromString 05 06 97 returns the date specified by the argument which must represent a date in one of three formats Jan 2 1990 2 Jan 1990 02 01 90 The delimiters between the month day and year can be any sequence of non alphanumeric characters e indexOfMonth e g f April Date indexOfMonth gt 4 returns an integer from 1 to 12 indicating the month index for the symbol argument WebBase User s Guide 213 Chapter 11 Expressions 214 leapYear e g f 1996 Date leapYear gt 1 f 1997 Date leapYear gt 0 returns 1 if the year specified in the argument is a leap year otherwise O leapYearsTo e g f 1996 Date leapYearsTo gt 23 returns the number of leap years from 1901 to the year before the year specified in the argument monthNameFromString e g f May Date monthNameFromString gt May returns the symbol for the month name corresponding to the argument monthNames e g f Date monthNames gt Dictionary Jul gt 7 July gt 7 Oct gt 10 Feb gt 2 March gt 3 December gt 12 November gt 11 Mar gt 3 February gt 2 Jan gt 1 January gt 1 August gt 8 Dec gt 12 October gt 10 Nov
23. 73 77 94 WHERE Clause 259 while macro 111 Windows NT Service Parameters 38 with macro 112 116 with 186 with with 186 with with with 186 with with with with 186 withCrs 197 writeBuffer ofSize atPosition 226 writeFile macro 113 WSAEADDRINUSE 26 WSANO_RECOVERY 26 X x 181 x 181 xy 181 xor 210 325 Index Y Z y 181 zapCrs 197 y 181 zoneName 223 year 214 223 326 WebBase User s Guide
24. Gone Length Required Precondition Failed Request Entity Too Large Request URI Too Large 15 Unsupported Media Type 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Time out 505 HTTP Version not supported PPP sp buUNnNro ls The actual message displayed may vary by browser Browsers are not required to understand the meaning of all these status codes However browsers must understand the class of any status code as indicated by the first digit and treat any unrecognized response as being equivalent to the x00 status code of that class theArgs this variable contains the names of all command line arguments that were specified as part of the URL This variable is in fact a local variable but as it is created dynamically for each form that is processed by WebBase its description is included here The variable is used in the construction of the 7 WHERE variable if used within the form A form designer can also use this variable to determine input arguments and their values It is possible to modify the list of variable names found in theArgs and thus impact the resulting WHERE variable For example one could use the following set newArg GE 13 set StheArgs newArg GE theArgs add to add the variable named newArg GE to the list of arguments stored in theArgs The resultant WHERE variable would now include the following test along w
25. You may use the software on any single computer owned by you For some products a multi use license may be purchased to allow the software to be used on more than one computer owned by the purchaser including a shared disk system Contact your authorized ExperTelligence dealer for information on multi use licenses 1995 7 ExperTelligence Inc 203 Chapala St Santa Barbara CA 93101 805 962 2558 WebBase ExperTelligence and the WebBase and ExperTelligence logos are trademarks of ExperTelligence Inc Other brand and product names are trademarks or registered trademarks of their respective holders Brand and product names are mentioned for reference purposes only WebBase User s Guide WEB y O GA E O E ExperTolligence Table of Contents Table ECOS sico 111 Chapter 1 What is WebBase 1 1 1 WebBase Features and Benefits cccccssssssssccccsssvssvecsccccccenssssvscccccesvssccesescceensasvsscceseseeascvsessensavsvsees 1 12 WEDBase VS CL r a Ta a AE E E EE E E ETE E EEA SNEEN 3 Chapter 2 Introduction 5 2l Basic Terminology audi 5 2 2 A WebBase Example cie EE A E E E EA E i 7 23 Using the WebBase Language cm id ib 9 2 4 WebBase Server ys HTTP Servei crci ciro cogs snedeess segeetassedivguouesdedunticgsevgucuseossothsunbeo es suacrsneunbiocies 10 Chapter 3 Installation 11 1 SyStem Requitements mii didas 11 3 2 Installing WebBase cion A A aiii 12 CEIC OO 12 WebBase Files on the Web c0 ccc
26. asSortedCollection e g f dict asSortedCollection gt SortedCollection 56 4 10 returns a sorted collection containing all the associations in the receiver sorted in ascending order asValues e g f dict asValues gt OrderedList 56 4 10 returns an ordered list containing all the values in the receiver Note that if there are multiple associations with the same value there will be multiple entries in the ordered list that are the same value at e g f Version dictl at gt 4 10 returns the value of the association whose key equals the argument If not found an error is reported at put e g f Build 57 dictl at put dictl gt Dictionary Build gt 57 Version gt 4 10 returns the second argument If the receiver contains the association whose key is the same as the first argument replaces the value of the association with the second argument If the receiver does not contain an association whose key is the same as the first argument creates a new association whose key is the first argument and whose value is the second argument and adds it to the receiver elementsEqual e g set assoc3 Title title Association key value set assoc4 Company ExperTelligence Inc Association key value set dict2 Dictionary new f assoc3 dict2 add f assoc4 dict2 add f dict2 dict elementsEqual gt false returns true if the receiver has e
27. drivePrefix e g f dirl drivePrefix gt C returns a string that contains the logical drive e g lt drive gt for real drives or SERVER ALIAS for network drive names e file e g f default htf dirl file gt a FileStream on default htf returns a file stream for the file named by the argument in the current directory If the file does not exist it will be created e fileReadOnly e g f default htf dirl fileReadOnly gt a FileStream on default htf returns a file stream for the file named by the argument in the receiver directory If the file does not exist it will be created and opened for read only access e filesNamed e g f txt dirl filesNamed testfile txt returns a collection of file names from the receiver filtered using the argument e g TXT e formatted e g f dirl formatted gt OrderedCollection wizard gif 432 06 28 95 12 24 58 a 517759773 wizard htf 332 02 19 97 08 40 44 a 575907094 testfile txt O 03 21 97 03 25 46 a 578124599 default htf 184 02 26 97 03 22 40 576355028 expere2 gif 170 06 02 95 06 36 26 a 516043917 experli gif 875 02 24 97 08 34 12 a 576209990 ii_secur hti 314 02 19 97 09 25 34 a 575884081 ii_anchr hti 260 02 20 97 07 29 54 a 575945659 etc returns a collection of arrays of file information for the receiver Each array has five entries file name size date ti
28. f strm Yotime printOn24Hr f strm contents 13 30 00 appends a string representing the receiver time to the stream specified in the argument The time is in 24 hour clock format seconds e g f time seconds 0 returns the number of seconds past the minute subtractTime e g set oneHourInSeconds 60 60 set timel oneHourInSeconds Time fromSeconds f timel time subtractTime gt 12 30 00 PM returns a new time in which the amount of time specified in the argument a time has been subtracted from the receiver time Time Class Operations The Time variable allows the Time class to be accessed This section covers the operations that the Time class can do dateAndTimeNow e g f Time dateAndTimeNow 03 19 97 09 38 17 AM returns an array of two elements containing the current date and the current time Note that the array returned by the Date class is the same as the array returned by this operation fromSeconds e g f 4500 Time fromSeconds gt 01 15 00 AM returns a time which represents the number of seconds in the argument after midnight fromString e g f 11 29 00 PM Time fromString gt 11 29 00 PM returns a time for the value given by the argument The argument must be in the form specified by the current system time format e g 12 hour or 24 hour format fromString12 e g f 3 30 00 PM Time fromString12 gt 03 30 00 PM returns a time for the value given by th
29. gt Wednesday 19 Mar 1997 11 23 16 GMT returns a string containing the current date and time in a format acceptable as the cookie expiration time used when doing a setCookie asDate e g f dateTime asDate 03 19 97 returns a string representing the date portion of the receiver asDateTime e g f dateTime asDateTime 03 19 97 11 23 16 AM returns a string representing the date and time of the receiver Uses the OS to determine 12 hour or 24 hour format WebBase User s Guide 217 Chapter 11 Expressions 218 asDateTimewithPicture e g f MMM dd yyyy dateTime asDateTimewithPicture Mar 19 1997 11 23 16 AM returns a formatted string of the receiver s date and time with the date portion displayed according to the argument The time portion will be formatted as in the asDateTime method See Date printWithPicture for the formatting details See also asDateTime12withPicture and asDateTime24withPicture asDateTimel2 e g f dateTime asDateTime12 gt 03 19 97 11 23 16 AM returns a string representing the date and time of the receiver 12 hour format asDateTimel2withPicture e g f MMM dd yyyy dateTime asDateTimel2withPicture Mar 19 1997 11 23 16 AM returns a formatted string of the receiver s date and time with the date portion displayed according to the argument The time portion will be formatted as in the asDateTime12 method See Dat
30. one two three four returns a new collection with four elements the first second third and fourth arguments 11 9 Arrays An array is a collection of any objects accessed through a fixed range of integer indices representing the positions of the elements within the array Note that the size of an array cannot grow There are no operations that are specific to arrays All of the general collection instance operations above are applicable to an array Likewise the general collection class operations described above are valid when sent to the variable Array 11 10 Strings Strings are a collection of characters that are enclosed in single quotes To include a single quote mark within a string put two quote marks together A string and a character within WebBase are different types of data See the section on Characters for the representation and use of characters within WebBase The following operations can be performed on any string WebBase User s Guide 185 Chapter 11 Expressions String Instance Operations 186 This section describes all the operations that can be performed on a string NOTE The inclusion of a or in a string may cause unexpected results because WebBase may interpret it as an opening or closing to a macro instead of part of a string Instead of using these characters in strings in a form the user should use the WebBase dynamic variables leftBrace and rightBrace and
31. or CGI is a standard for external gateway programs to interface with information servers such as HTTP or Web servers A plain HTML document that the Web server retrieves is static which means it exists in a constant state a text file that does not change A CGI program or script is executed in real time so that it can output dynamic information Cookie Cookies are a general mechanism which server side connections can use to both store and retrieve information on the client side of the connection The addition of a simple persistent client side state significantly extends the capabilities of Web based client server applications When the server returns requested information to a client system the server may also send a piece of state information that the client will store Included in that state object is a description of the range of URLs for which that state is valid Any future requests made by the client which fall in that range will include a transmittal of the current value of the state object from the client back to the server The state object is called a cookie for no compelling reason WebBase User s Guide Chapter 2 Introduction Database server A machine whose primary purpose is to run database software accessed by many other machines via some form of network connection Domains Domains are adminstrative entities that provide decentralized management of host naming and addressing The Domain Name System DN
32. representing the horizontal and vertical coordinates respectively Point Instance Operations This section covers all the operations that can be performed on a point Two example points are used in the following and are generated using set point 3 5 Point x y and set point2 4 6 Point x y e eg f point point2 gt 1 1 returns a new point which is the difference between the receiver and the argument The argument can be a number or another point If it is a point the x coordinates are subtracted and the y coordinates are subtracted If it is a number the value is subtracted from both the x coordinate and the y coordinate e eg f point point2 gt 12 30 returns a new point which is the product of the receiver and the argument The argument 178 WebBase User s Guide can be a number or another point If it is a point the x coordinates are multiplied and the y coordinates are multiplied If it is a number the value is multiplied by both the x coordinate and the y coordinate e e g f pointl point2 gt 4 3 6 5 returns a new point which is the receiver divided by the argument The argument can be a number or another point If it is a point the x coordinates are divided and the y coordinates are divided If it is a number the x coordinate and y coordinate of the receiver are both divided by the value e e g f point point2 gt 1 1 returns a new point which is the receiver divi
33. 0 0 0 0 0 26 Mar 1997 08 14 16 0800 none Pause_Server_ gt _active HTTP 1 0 27 0 0 27 0 0 1 26 Mar 1997 08 14 48 0800 GET wbwizard HTTP 1 0 200 473 Mozilla 3 0 Win95 I 270 00 4 27 0 0 1 26 Mar 1997 08 14 49 0800 GET wbwizard Wizard htf now 29688 HITP 1 0 200 6136 Mozilla 3 0 Wings T 27 0 0 27 0 0 1 26 Mar 1997 08 14 51 0800 GET wbwizard BasicEx now 29689 HTTP 1 0 200 491 http 127 0 0 1 wbwizard Wizard htf now 29688 Mozilla 3 0 Win95 I 210 60 s 27 0 0 1 26 Mar 1997 08 14 52 0800 GET wowizard basicex Wbexams htf now 29691 HTTP 1 0 200 7783 http 127 0 0 1 wbwizard Wizard htf now 29688 Mozilla 3 0 Win95 I 27 00 27 0 0 1 26 Mar 1997 08 14 54 0800 GET wowizard basicex WBexaml HTF now 29692500 useBACKbutton XX doUSEit HTTP 1 0 200 1033 http 127 0 0 1 wbwizard basicex Wbexams htf now 29691 Mozilla 3 0 Win95 I ZO Os 27 0 0 1 26 Mar 1997 08 14 56 0800 GET wowizard basicex WBexams htf now 29694800 HTTP 1 0 200 7783 http 127 0 0 1 wbowizard basicex WBexaml HTF now 29692500 useBACKbutton XX doUSEit Mozilla 3 0 Win95 I 27 00 27 0 0 1 26 Mar 1997 08 14 58 0800 GET wowizard basicex WBexam2 HTF now 29696340 useBACKbutton XX doUSEit HTTP 1 0 200 1395 http 127 0 0 1 wbwizard basicex WBexams htf now 29694800 Mozilla 3 0 Win95 I 21000 27 0 0 1 26 Mar 1997 08 14 59 0800 GET wowizard basicex WBexams htf now 2969
34. 0 0 0 0 Pause Server gt paused Wed 26 Mar 1997 08 26 57 0 0 0 0 0 0 0 0 Pause Server gt active Wed 26 Mar 1997 08 27 02 0 0 0 0 0 0 0 0 Pause Server gt paused Wed 26 Mar 1997 087527303 0 0 020 0 0 0 0 Quitting EErEE Wed 26 Mar 1997 08 27 03 0 0 0 0 0 0 0 0 Stop Log Wed 26 Mar 1997 08 27 12 0200020 040 0 0 Stark Log Wed 26 Mar 1997 08 27 13 0 0 0 0 0 0 0 0 Pause Server gt paused Wed 26 Mar 1997 08 27 13 0 0 0 0 0 0 0 0 Pause Server gt active Wed 26 Mar 1997 08 27 32 127 0 0 27 0 0 1 GET wbwizard HTTP 1 0 lt 473 gt Wed 26 Mar 1997 08 27 33 127 0 0 27 0 0 1 GET wbwizard Wizard htf now 30453 HTTP 1 0 lt 6136 gt Wed 26 Mar 1997 08 27 36 127 0 0 27 0 0 1 GET wbwizard BasicEx now 30453 HTTP 1 0 lt 491 gt Wed 26 Mar 1997 08 27 36 127 0 0 2140 01 GEL wowizard basicex Wbexams htf now 30456 HTTP 1 0 lt 7783 gt Wed 26 Mar 1997 08 27 38 127 0 0 21 00 L GET wowizard basicex WBexaml HTF now 304566208useBACKbutton XX doUSEit HTTP 1 0 lt 1033 gt Wed 26 Mar 1997 08 27 39 127 0 0 27 0 0 1 GET wowizard basicex WBexams htf now 30458430 HTTP 1 0 lt 7783 gt Wed 26 Mar 1997 08 27 40 127 0 0 290 001 GEL wowizard basicex WBexam2 HTF now 30459810 useBACKbutton XX doUSEit HTTP 1 0 lt 1395 gt Wed 26 Mar 1997 08 27 42 127 0 0 27 0 0 1 GET wowizard basicex WBexams htf now 30460850 HTTP 1 0 lt 7783 gt Wed 26 Mar 1997 08 27 46
35. 11 Expressions 204 returns the argument after adding all the elements in it to the receiver Note that the elements in the argument collection are associations addDictionary e g set assoc3 Title title ZJAssociation key value set assoc4 Company ExperTelligence Inc Association key value set dict2 Dictionary new f assoc3 dict2 add f assoc4 dict2 add f dict2 dictl addDictionary dictl gt Dictionary Title gt WebBase 4 10 build 56 Build gt 56 Company gt ExperTelligence Inc Version gt 4 10 returns the receiver after adding all the associations in the argument to the receiver asArray e g f dictl asArray gt 56 4 10 returns an array containing all the associations in the receiver asKeys e g f dictl asKeys gt OrderedList Build Version returns an ordered list containing all of the keys in the receiver asOrderedCollection e g f dictl asOrderedCollection gt OrderedCollection 56 4 10 returns an ordered collection containing all the associations in the receiver asPairs e g f dictl asPairs gt OrderedList Build gt 56 Version gt 4 10 returns an ordered list containing all the associations in the receiver associationAt e g f Version dict associationAt gt Version gt 4 10 returns the association whose key is the same as the argument If not found an error is reported
36. 137 Chapter 9 Variables 138 variables the values are the values of the local variables This is useful to determine if a particular local variable has been defined Local variables include input variables command line arguments cookie variables header variables and variables set using the set or setLocal macros Modifying this dictionary will have no effect on the local variables active in WebBase See also local VariablesHTML localVariableseHTML e g see below formats the local variables and their values for a nice printout on the browser This information is appended to most error messages returned by WebBase to aid in debugging the form being developed See also local Variables Example 9 24 ZelocalVariablesHTML display Local Variables 15 e accepts OrderedCollection image gif image x xbitmap image jpeg image pjpeg e S search now 32254 AND arg2 abc e StheArgs OrderedList arg2 now e Accept image gif image x xbitmap image jpeg image pjpeg x e Connection Keep Alive e Cookie WebBaseID W14263151E161808318465B CookieCounter 2 e CookieCounter 2 e Host 127 0 0 1 e User Agent Mozilla 3 0 Win95 1 e WebBaseID W14263151E161808318465B logRecord e g 127 0 0 1 10 Mar 1997 11 19 55 0800 GET test HTTP 1 0 200 0 Mozilla 3 0 Win95 I a copy of the log record generated for the request that referenced this form If logging is enab
37. Chapter 11 Expressions 194 set var varname asSqlString quote readFromFile e g f c temp nessage txt readFromFile The readFromFile allows one to read text from a file in the file system and either display that text as part of the returned HTML or store that text into a WebBase variable and manipulate it as with any other text string The readFromFile message is sent to a string that contains a pathname for the file to be read The pathname string is NOT relative to the Directory parameter as is used for htf forms but must be a full pathname for the host machine s file system The read is protected such that if an error occurs in locating and or reading the file an empty string will be returned rather than an error The isValidFile message can first be sent to the same pathname string to determine if the file does exists Note that this readFromFile message reads and returns the entire contents of the file as a string so users should be aware of the possible memory constraints of reading a very large file Also note that if the string being read is to be displayed by a browser any HTML in the file WILL be processed by the browser but any WebBase macros or variables WILL NOT be recursively processed by WebBase they will be simply returned as text This is not another way of accomplishing what the insert macro does rejectComments e g f Here is a comment within a string rejectComments gt Here is a within a str
38. Common Log Format is used This format displays the address of the requesting browser the date and time of the request the request line received from the browser the status code returned to the browser the number of bytes transferred back to the browser the Referer variable and the User Agent variable If the user requests WebBase to print the date and time on a browser the WebBase Transactions Service window will include an entry of the form 2 lt gt 4 8 127 0 0 1 14 Mar 1997 11 43 38 0800 GET dateTime HTTP 1 0 200 496 Mozilla 3 0 Win95 I Other information displayed in the text area has been previously described in conjunction with the different menu options available on the window 5 4 WebBase Total View Window People have often asked How can you tell what browser or server is handling my web information The general reply is it s in the header But one does not get to SEE the header it is read and used by your browser and server but the information is kept hidden from you the user The Total View utility has been designed so that users can see the information contained within a header The WebBase Total View Window is displayed when the Total View option in the Edit menu in the WebBase Server window is selected An example of the WebBase Total View Window 1s shown below 62 WebBase User s Guide WebBase User s Guide 63 Figure 5 19 WebBase Total View Window WebBase 56 Total Vi
39. Dialog 4 Reset TCP IP Socket Interface when fails Current Yes E No Cancel e Status gt Set heartbeat sound This option is only available when the heartbeat service has been stopped If this option is selected the Heartbeat Sound Dialog shown in Fig 5 26 is displayed The user is prompted whether a sound is played if a failure is identified By default no sound is played If the user selects to have a sound played the user cannot control which sound is played the only available sound is a dirge The global variable heartbeatSound can also be used to indicate whether a sound should be played if a failure is detected Figure 5 26 Heartbeat Sound Dialog gt Sound notice when fails Current No i No Cancel e Status gt Issue single heartbeat This option is only available when the heartbeat service has been stopped If this option is selected a single heartbeat command and reply sequence is issued and the results displayed in the text area of the window This single 68 WebBase User s Guide WebBase User s Guide 69 heartbeat if it fails will cause a reset TCP and sound based on the settings of these parameters not just a report on the status WebBase Heartbeat Text Window The WebBase Heartbeat Window text area shows information about each heartbeat command sent out and the reply that is received The information is presented in the format lt gt data Each line s
40. File WebBase 4 10 WebVars INI file sdirectoryBrowse s true SswhereAndOr AND B 2 Editing the System Registry The 32 bit systems store WebBase parameters extensions aliases multiple domains and global variables in the System Registry This is a Windows utility that is used by many different applications In general it is recommended that the WebBase WebWizard Registration Database option be used to add or modify WebBase entries in the System Registry However if it is not possible to start WebBase or if an entry needs to be deleted that can only be done by directly editing the System Registry This section includes details on how to access and edit the registry Accessing the System Registry All of the WebBase parameters aliases etc are maintained in the same location within the System Registry The following steps should be taken regardless of what type of WebBase information is to be added edited or deleted in the registry 1 Run the Registry Editor On Windows NT this is REGEDT32 EXE on Windows 95 this is REGEDIT EXE 2 Open HKEY_LOCAL_MACHINE SOFTWARE ExperTelligence Inc WebBase 4 10 3 All WebBase parameters are stored within this key If this full path does not exist create each key using the exact information presented above WebBase User s Guide 303 Appendix B Special Configuration Issues Parameters 1 Select the Parameters entry Enter any new WebBase parameters as a string or DWOR
41. File File e SFloat Float e SFractions Fraction e Integer Integer e SNumberS Number e SOrderedCollection OrderedCollection e SOrderedList OrderedList e SPoint Point e SReadStream ReadStream e SReadWriteStream ReadWriteStream e SRegistrationDatabase RegistrationDatabase e SSortedCollection SortedCollection Oo Oo e Time Time e SUniversalTimes UniversalTime Oo SWriteStream WriteStream e gmt e g 03 10 97 18 35 12 the current time It is accessed from the operating system once per form the first time it is referenced and displayed in GMT format e PGT e g gt returns the greater than gt character e Q headerVariables e g Dictionary User Agent gt Mozilla 3 0 Win95 I Connection gt Keep Alive Host gt 127 0 0 1 Accept gt image gif image x xbitmap image jpeg image pjpeg a dictionary of all the header variables The keys to the dictionary are the names of the variables the values are the values of the header variables This is useful to determine if a particular header variable has been defined Header variables are also considered local variables This variable allows the user to see specifically which local variables came from header information The dictionary returned by this variable is a copy of the dictionary containing all the header variables Thus modifying this dictionary will have no effect on the hea
42. For example the user variable UserVar might have the value Denny in one user dictionary while it has the value Denny Smith in another user dictionary The variable ouserName identifies which user variable dictionary is currently in use It is possible to use several user variable dictionaries all within a single form The default value for this variable is the value of the local variable WebBaseID As described previously the WebBaselD variable is created for each request received from a browser that does not include WebBaselD as a cookie variable On the first interaction between a browser and the WebBase server WebBase will generate this variable and return it as a cookie If the browser supports cookies the variable will be returned on any subsequent requests from the browser until the browser is shut down It is important to note that user variable dictionary names should be unique for each user accessing the dictionary The information stored in user variables is generally information that has been entered by a specific user and should be considered sensitive Under no circumstance should it be made available to other users accessing the same form If a user dictionary name is created which is not unique to each user information may be improperly displayed to other users For example let s create a user variable dictionary whose name is set to theUserDict The first form requests a user to enter their name addres
43. HTML forms One writes lt INPUT NAME name VALUE value gt if value contains any double quotes the same type of syntax problem occurs embedded s need to be doubled asFieldName e g f Goodbye Hello asFieldName gt Goodbye Hello if the receiver contains any space character returns a new string containing the receiver enclosed in double quotes If the receiver does not contain any space characters returns the receiver asFieldNameName e g f Field One asFieldNameName Field One if the receiver is enclosed in double quotes returns a new string with the starting and ending double quotes removed If the receiver is not enclosed in double quotes returns the receiver asFloat e g f 13 6 asFloat gt 13 6 f not a number asFloat gt 0 0 returns a float value if the string is the representation of a number otherwise returns 0 0 asInteger e g f 13 asInteger gt 13 f not a number asInteger gt 0 0 returns an integer value if the string is the representation of a number otherwise returns 0 0 asLowercase e g f Hi There asLowercase gt hi there returns a new string in which all the characters of the receiver have been converted to lowercase This can also be written using asLowerCase asNonEmptyString e g f Hi asNonEmptyString gt Hi f asNonEmptyString gt amp nbsp WebBase User s Guide returns the receiver if the recei
44. Menu Option 51 161 remove macro 98 remove 201 227 230 removeAll 201 206 removeAll macro 99 removeAll 201 230 removeAssociation 206 removeCookie macro 99 123 removeFirst 201 removeGlobal macro 100 124 removeHeader macro 100 removelndex 202 removeKey 206 242 removeLast 202 removeLocal macro 100 removeString 195 removeStringlgnoreCase 195 removeTimer 247 removeUser macro 100 rename to 228 replace with 196 replaceCharacter from to withString 196 replaceFrom to with 165 185 replaceFrom to with startingAt 185 replaceFrom to with startingWith 185 replaceFrom to withObject 185 replaceNewlinesWithString 196 replaceString with 196 reset 232 return macro 86 101 reverse 186 reverseContents 232 rounded 175 181 roundTo 175 RPN 165 166 168 S scope macro 98 101 120 Scope variables 99 101 search 247 seconds 217 222 seconds built in command 27 SELECT 7 72 90 110 153 195 200 201 235 Set heartbeat interval Menu Option 67 Set heartbeat reply time Menu Option 67 Set heartbeat reset TCP Menu Option 68 Set heartbeat sound Menu Option 68 Set Lines Menu Option 59 67 286 set macro 103 120 323 Index Set Mail Limit Menu Option 287 setCookie macro 104 122 setGlobal macro 104 124 setHeader macro 105 setLocal macro 105 120 setString macro 105 setT
45. Multiple records will often be returned as the result of a query The individual records can be accessed using the with or forRow macro As each record is processed within the macro the field variables within the macro take on the value of the field within the record being processed The forRow macro is useful for iterating through multiple records returned from a database and using field variables to access the data values within the record currently being processed The with macro is useful for accessing field variables in a single record of data When a forRow or with macro is encountered in a form any references to field variables will be resolved against the record set specified as the argument to the macro In the forRow macro this will be the current record within its record collection In the with macro this will be the argument if it is an OdbcRowObject or it will be the first entry in the collection if the argument is a collection A potentially confusing situation can arise when a second set of records is acquired via an sql call within a forRow or with macro It is not possible to access the field variables of this new data collection unless they are also accessed within a forRow or with macro The result set used to resolve field variables is that for the current forRow or with macro Field variables can also be specified outside the forRow or with macros In this case the first record in the last collection of data records retur
46. Ra 294 Mail List AAA en onnie eaeoe orea Tease an anea eael eei Teese ne 294 Envelopes erouer inline E A AT eins 295 Erivelope Instance Operations una 295 16 6 E Meree Exampl s ici dida iis steak nse pei ee es 295 Appendix A Software License Agreement 296 Appendix B Special Configuration Issues 298 B 1 16 bit Sy Stems imstande ddr haria 298 Install A ede ok Graal edt eat ease Muelle 298 Editing Parameters sai rr Bd poe PG Dee pede Te REE Gea 301 EXTENSIONS e lud die aane e Eea Pane oon desena 302 Aliases unas 302 Global Variables moi a tie ceva tiated A io 303 B 2 Editing the System Registry ainia a a a e a tilda 303 Accessing the System RESIS thy esseci ni lili lito lid lates ES NE E Sonus EE S 303 A NN 304 EXtenslOOS ii ada naaa 304 Almost locals AA lol E lalo A caian aN 304 Multiple Domains censores ties dls ddr ii a 304 Global Variables E E E 304 Appendix C Header Variables 306 HTTP 1 1 Input Header Variables iniciar a 306 Appendix D Obsolete Components 310 D F Obs lete macrose eaae E E a a a a e a a 310 D 2 Obsolete dynamic va abl S anuna enean eean EEE EE E E EEES SESA SESS 311 D 3 Obsolete variable parameters cuac ida ala a daa E a 312 Index 315 WebBase User s Guide ix Table of Contents x WebBase User s Guide WEB 52 What is WebBase Chapter 1 I don t want to teach myself PERL or other CGIs said Matt McWhinney technical architect at Ameritech Corp a regional Bell operating
47. Registry and then stop and restart WebBase Domains This section is only included if the user has defined any domains in the System Registry If so each domain and its associated parameters are displayed in this section Multiple domain support and how to define multiple domains are found in Chapter 4 If a parameter within a domain needs to be added or modified or if a domain needs to be added it is necessary to modify the information in the System Registry and then stop and restart WebBase Commands This section lists all the built in commands that are available in WebBase These are described in Chapter 3 Dynamic variables This section lists all the WebBase dynamic variables These are described in Chapter 9 Global variables This section lists all the global variables If the user selects the Load Global Variables option from the Options menu the updated global variables are displayed here 5 3 WebBase Transactions Service Window The WebBase Transactions Service Window maintains a queue of messages the most recent is displayed at the top The messages are those that are written out to the standard log file If the global variable transactionsWindow is created and set to true this window will automatically be opened when WebBase is started 58 WebBase User s Guide Figure 5 16 WebBase Transactions Service Window ES WebBase 56 Transactions Service 100 lines Al x File Edit Status 1 lt gt Service
48. URL given by the user or referring resource generally an HTTP URL The Host field value MUST represent the network location of the origin server or gateway given by the original URL This allows the origin server or gateway to differentiate between internally ambiguous URLs such as the root URL of a server for multiple host names on a single IP address e If Match used with a method to make it conditional A client that has one or more entities previously obtained from the resource can verify that one of those entities is current by including a list of their associated entity tags in the If Match header field The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction overhead It is also used on updating requests to prevent inadvertent modification of the wrong version of a resource e If Modified Since used with the GET method to make it conditional if the requested variant has not been modified since the time specified in this field an entity will not be returned from the server instead a 304 not modified response will be returned without any message body e If None Match used with a method to make it conditional A client that has one or more entities previously obtained from the resource can verify that none of those entities is WebBase User s Guide 307 Appendix C Header Variables current by including a list of their associated entity tags in the If
49. WebBase WebWizard which provides tools and utilities to help users learn about WebBase and speed up their forms development The WebBase WebWizard features are described in a separate document Chapter 3 Installation 3 3 Standard WebBase Installation The WBSetup exe installation program is designed to install all components of the WebBase application ideal for an initial installation or only those components you select during the process This section describes the standard initial installation of WebBase It is recommended that you install WebBase into a WebBase directory at the top level on your system s hard drive This is the default assumed by the WBSetup exe installation program and this documentation If you choose to place the WebBase application into a different directory please take this into account when reading the following The WBSetup exe program will step you through the WebBase installation process with a series of dialogs requesting necessary information from you providing you with suitable defaults for most installations and providing Help facilities throughout the process should questions arise At any stage of the installation process you can Abort the installation the installer will remove any WebBase and or temporary installer files it has already installed To start the installation of WebBase double click on the WBSetup exe file The screen shown in Fig 3 1 identifies the current WebBase versi
50. a URL WebBase locates the file on disk reads the information into it and generates an internal tree structure representing the WebBase macros and variables Once the tree structure is built WebBase then processes it The appropriate value of each variable is WebBase User s Guide substituted any operations are performed and the results are added into the stream that is finally returned to the browser This stream contains only text and HTML tags all WebBase constructs have been removed WebBase is set up by default to perform forms caching The internal tree structure that is built is placed into the form cache If the file is subsequently referenced the internal structure is removed from the cache and re used The forms are re entrant only the associated variables and fields differ This provides a performance advantage is that WebBase does not have to hit the disk to read the form each time it is accessed nor does it have to parse the text each time There are two variables affecting caching cacheEnabled and Y cacheTimeCheck Both of these can be modified via the WebBase WebServer menus By default both variables are set to true The cacheEnabled variable indicates that forms caching is to be used It is strongly recommended that this variable always be set to true as it provides a performance improvement with no associated limitations The cacheTimeCheck variable is only active when forms caching is enabled If set to tr
51. a user variable Finally the anchors and FORM statements are set up to return token to the first form No other local variables need to be passed back to the first form The first form is redisplayed with the error information at the top and the values as entered by the user the first time redisplayed in the input fields All of this is possible using a local variable token and storing information in the user variable dictionary Plus there is no dependence on whether a browser supports cookies or not The form designer uses the initial value of WebBaselD or any other unique value to create a token The form designer then passes that token to any other forms to be accessed Creating User Variables User variables are created via the setUser macro The setUser macro operates exactly as does the set macro except that it will store its name value pair in the appropriate user variable dictionary as described above The following expression will create a user variable called xx whose value will be the string test setUser xx test Using the variable xx in a subsequent form using the same user variable dictionary will return the value test User variables are accessed as are any other WebBase variables by merely specifying their name within curly braces e g UserVar and the value of the variable will be substituted in the form at that point Since user variables are stored in a user dictionary the con
52. aaee EEA EEE T dnd EAE EN N ENEA Eee E 158 10 2 Us r Variable Dict On aries co cc eu a ok ote ie ek heel tee ek a eee ed aed eed A Ea 159 Special User Vanlables incidan lente ico iii iii 159 User Variable Dictionary Maintenance escsesccceseecesscesscecseecsseeeesseecsseecseeesseecesaeecsaeesseeseneeeesaes 160 10 3 Using User Variables in WebBase cialis apocss oops iii tai 160 User Variable Design iuris 161 ISA CA eenean aeee eree eee eh ee eae E eats turtles oeebact stat eves ntet ata ee aay ESEE 161 Creating User Variables iieiea a a A a a e aa a da 162 Persistent User Variables ile abuts bol ied anh a a a n eaa a EEK eaat 163 Chapter 11 Expressions 164 11 1 WebBase Expression Components csscccsseccesseeeseeesscecscecsseecesaeecsaeecsseessseecesaeeesaeecsaeesseeseneeeesaes 164 TEZO RPN Notat Oinon ea a aa 165 Building Compound Statements in RPN oooooccnnocccconccconcnonnnnononccnonncnonaccnnanonnncnonncnonnncnn arco nncnonccranccinnnss 167 11 2 General Operations cuina era 169 General Tnstance Operations socios dana 169 11 NUMBELS cet it laica lali 171 Number Instance Op rations Homes ice 171 LACIE nd a arts 175 Integer Instance Operations ciao lada caian lacio iia 175 Integer Class Operations cu neo dad ia 177 IIS A NN 177 Float Instance OperatiOOS iia iran 177 Float Class Operations teclea soets erre O eee ate ante os tg ae aa ee 177 11 6 Fractions ita 178 Fraction Instance Operations iini eh i RS A A
53. active as of Fri 14 Mar 1997 10 20 53 WebBase Transactions Menu Bar The following menu options are available on the WebBase Transactions Service Window WebBase User s Guide 59 File gt Exit If this option is selected the WebBase Transactions Service Window is closed Closing this window has no effect on other WebBase functions Edit gt Cut this menu option is only active if an area of text in the window has been highlighted If this menu option is selected the highlighted text is copied into the system s paste buffer and removed from the text area It can then be placed into another application e g Word PowerPoint The keyboard shortcut lt ctrl gt X press the Ctrl key and the X key down at the same time can also be used to perform a cut operation Edit gt Copy this menu option provides the same functionality as described for the Late Breaking News Window Edit gt Clear All If this option is selected all of the information in the text area is removed Edit gt Find this menu option provides the same functionality as described for the Late Breaking News Window Edit gt Find Again this menu option provides the same functionality as described for the Late Breaking News Window Edit gt Set Lines If this option is selected the Set Lines Dialog shown in Fig 5 18 below is displayed The number of lines of information to be displayed must be between 10 and 10000 the default is 100 The number of lin
54. and JocookieV ariablesHTML Example 9 8 cookieOutVariablesHTML display Output Cookie Variables 0 NONE e cookiePath e g if this variable is set it becomes part of the cookie that is sent to the browser When one does a setCookie this variable along with cookieDomain and cookieExpires are appended to the value of the cookie The path attribute is used to specify the subset of URLs in a domain for which the cookie is valid The section on Cookie Local Variables earlier in this chapter provides additional details about cookies domains and path It is important to note that the value of this variable is used at the time the cookie is created by the setCookie macro it is thus possible to change paths for cookies created within a single form by changing the value of this variable e cookies e g true a flag indicating whether the browser sent a cookie to the WebBase server If true this indicates that the browser is cookie enabled and the server previously sent a cookie to this WebBase User s Guide 129 Chapter 9 Variables 130 browser If false this either indicates the browser 1s not cookie enabled or no cookies have been sent to the browser from the server and thus none have been returned On the first interaction with a browser WebBase creates a cookie variable called WebBaselD that is returned to the browser If the browser is cookie enabled all subsequent requests from this browser will incl
55. are complicated to maintain No scripts HTML files contain the embedded SQL Database queries return only text scripts Database queries return row objects massage the text results into HTML WebBase dynamically lays out HTML Browser cookie is tricky Browser cookie is automatic w WebBase User s Guide Chapter 1 What is WebBase 4 WebBase User s Guide WEB 5 Introduction ExperTolligence Chapter 2 This chapter presents introductory material about WebBase including general terminology so that the user has a better understanding of how WebBase can be used 2 1 Basic Terminology Before discussing the specific features of WebBase it is necessary to define some special terminology The section that follows identifies terms that are used in this manual Review these definitions carefully and try to understand them completely before reading further in this manual Anchor A link from a portion of a web page e g a word or phrase to another location on the current web page or a totally different web page Browser A browser is a client side program that allows a user to view the pages of information that others create and offer on the World Wide Web The user identifies a web address to the browser which then issues a request to the HTTP Server at the web address The browser then displays the information returned from the server Synonym Web Browser CGI script The Common Gateway Interface
56. as shown above a WebBase server or a non WebBase server could use the exact same form The GE variable used in the example generates a gt when WebBase expands it Some browsers end the lt INPUT gt tag if the VALUE contains a gt even if the contents of the VALUE field are correctly enclosed in double quotation marks if lt exp gt else if The if macro evaluates its expression argument which returns a result of either true or false If the result is true the text following the if up to the if keyword or the else keyword if present is processed If the expression evaluates to false the text following the optional else keyword is processed if present If the expression evaluates to false and no else keyword is present no text is returned by the if macro The only valid argument with the if macro is a WebBase expression constants or variables cannot be used Example 8 20 if Macro if 0 results size lt H2 gt Sorry no results lt H2 gt else lt H2 gt Hey we got f results size replies lt H2 gt if insert lt filename gt The insert macro allows one to insert other htf files at the location of the insert keyword as if the text from the inserted file existed inline at that location WebBase macros and variables within the inserted file are handled as in any htf file The insert macro allows one to write small htf files that can be more easily understood and allows one to develop segment
57. as the stream is streaming over nextInteger e g f strm nextInteger 0 returns the next integer from the receiver the value may include a radix In the example 0 1s returned because there were no integers to read from the file nextLine e g f strm nextLine gt set output false returns a string containing the characters of the receiver up to the next line delimiter nextMatchFor e g f strm nextMatchFor true returns true if the next object is the same as the argument otherwise false nextWord e g f strm nextWord set returns a string containing the next work in the receiver A word starts with a letter followed by a sequence of letters and digits peek e g f strm peek gt returns the next object in the receiver without advancing the stream position If the stream is positioned at the end returns nil peekFor e g f gt strm peekFor gt false returns true if the next object to be accessed in the receiver is the same as the argument otherwise false The stream position of the receiver is advanced only if the answer is true position e g f strm position gt 0 returns the receiver s current stream position 0 is at the start of the stream WebBase User s Guide e position e g f 25 strm position gt a FileStream on default htf returns the receiver after setting its position to the argument If the argument is outside the bounds of the receiver colle
58. average gt 2 returns the average of all the numbers in the collection Only numeric values in the collection will be processed non numeric values will be skipped and not counted in determining the number of items over which the average is taken concat e g f cltnl concat gt onetwothree f strl concat gt abc returns a string consisting of all the elements in the collection concatenated together The items in the collection must all be strings concatWith e g f clinl concatWith gt one two three f strl concatWith gt a b c returns a string consisting of all the elements in the collection concatenated together and separated with the specified separator character The elements in the collection must all be strings concatFrom to e g f 1 2 clin concatFrom to gt onetwo f 1 2 strl concatFrom to gt ab returns a new string made of the elements in the receiver from the start index first argument to end index second argument concatenated together The elements in the collection must all be strings concatFrom to with e g f 1 2 cltnl concatFrom to with gt one two f 1 2 strl concatFrom to with gt a b returns a new string made of the elements in the receiver from the start index first argument to end index second argument concatenated together with the given separator string third argument The elements in the collection must all be strings copy
59. browser the browser uses this to determine how to deal with the file upon receipt For example Content type text html tells a browser to handle HTML tags within the document while Content type text plain would cause everything to be displayed i e the lt H1 gt HTML tags would be printed and not processed The default file extensions and their mime types supported in WebBase are WebBase User s Guide 39 Chapter 4 Initialization 40 404 video x mpeg2 audio x mpeg video x mpeg2 application postscript audio x mpeg audio x aiff audio x mpeg audio x alff mpega audio x mpeg audio x aiff pac application x ms proxy autoconfiqd pplication x Javascript pbm image x portable bitmap dio basic image x photo cd ideo x msvideo application pdf pplication octet stream image x portable graymap mage x MS bmp application x perl plication octet stream image x png plication x cpio image x portable anymap plication x sh image x portable pixmap plication msword application postscript plication x dvi video quicktime plication postscript audio x pn realaudio plication octet stream audio x pn realaudio plication fractals image x cmu raster mage gif image x rgb plication x gtar application rtf plication x gzip application x sh hqx application mac binhex40 a ication x shar htf text html a ication x stuffit htm text html audio basic a a a a as au avi bin bmp class cpio csh doc dvi eps e
60. button and include the same information that would be in the command line were a submit button used For example HREF form htf valuel this value2 that How can I use the logging feature If the user has enabled the WebBase logging feature information on each command processed or returned by WebBase is written to a log file The greatest power of WebBase is its database access facilities Given this one of the best way of performing log analysis at a WebBase supported site is to use WebBase to log your hits to a database rather than using the default flat log files You can set up any number of log databases each specifically designed to collect that data that might be relevant to a particular web page or collection of web pages a user visits WebBase User s Guide You can then use WebBase htf forms to read these databases and provide you with meaningful statistics relative to that database These can be run from any browser so you can perform your analysis from a remote site with appropriate logon authorization to keep users out of these forms You can create a single file for one log database that performs the database write and insert or call this file from each page that you wish to have logged Thus you do not add a lot of code to each of your pages In addition if you have a very busy site you can create a User Variables dictionary into which you accumulate log information then write this information out t
61. by a subsequent form e variables that could maintain state information for a user who is browsing a number of related and or disjoint forms e variables whose state information could influence the content of the next form a user would visit 10 1 User Variables 158 User variables are simply variables that can be both read and written by an htf form They are created using the setUser macro When a local variable is created using the set or setLocal macro the local variable and its value are stored into a dictionary that is maintained as part of the form being processed As soon as the command is completed the local dictionary ceases to exist When a user variable is created the user variable and its value are stored in a user variable dictionary that is maintained as part of the WebBase server not part of the form being processed The data in the user variable dictionary is available to other forms being processed thus allowing state information to be maintained through multiple pages within a session WebBase User s Guide 10 2 User Variable Dictionaries The WebBase server maintains a list of all the user variable dictionaries that have been created This list and the dictionaries reside in memory and are accessible by any number of requests sent to WebBase The implementation and use of user variables and user variable dictionaries is up to each form designer WebBase supports multiple user dictionaries
62. caching will be used Figure 5 13 Enable Cache TimeCheck Confirmation Please Confirm 9 Disabling Cache TimeCheck means cached forms will always be used even if a more recent form exists in the file system Disable Cache TimeCheck WebBase User s Guide Please Confirm Enabling Cache TimeCheck means a cached form will be replaced by a more recent form from the file system Enable Cache TimeCheck Chapter 5 WebBase Windows Cache ODBC Connections This is a toggle on off option If ODBC connection caching is enabled default a check mark is displayed next to the menu option If ODBC connection caching is disabled no check mark is displayed If this option is selected one of the confirmations shown in Fig 5 14 is displayed The dialog on the left is displayed if connection caching is currently enabled the dialog on the right is displayed if connection caching is currently disabled If this option is enabled the connection to the ODBC database is added to the ODBC cache after the first database access Statements to send or retrieve data from this source are addressed to the source via the ODBC connection By caching the connection significant startup and connection operations are avoided on subsequent queries If this option is disabled ODBC connections must be reestablished on each query Having ODBC connections cached provides faster access if there are to be multiple accesses of the same database w
63. command processed or returned by WebBase It is possible to indicate that specific extension types are not to be logged This is done by preceding the mime type with a semicolon For example htm text html no WebBase processing no logging htf text html WebBase process no logging htf text html WebBase process no logging Notice that the order of the and characters do not matter A number of extensions that return images are set up by default to not generate log records including gif and jpg extensions Editing Extensions WebBase only reads extensions at startup If an extension is added changed or deleted WebBase must be stopped and restarted for the change to take effect To create and or edit the WebBase extensions perform the following steps 1 Start WebBase and open up the WebBase WebWizard by entering the URL http 127 0 0 1 lt port gt wbhwizard The lt port gt is the PortNo parameter If port 80 is used the lt port gt portion of the above URL does not have to be used 2 Select the Registration Database anchor 3 From the pull down list select HKEY_LOCAL_MACHINE and then press the OPEN button 4 Select the Open anchor next to the SOFTWARE key 5 Select the Open anchor next to the ExperTelligence Inc key 6 Select the Open anchor next to the WebBase key 7 Select the Open anchor next to the version numbe
64. cr 234 create 228 create 230 crString 233 currency parameter 155 current 230 Current User News Menu Option 49 57 currentDisk 230 currentUser 243 Cut Menu Option 59 64 66 285 D Data types 165 Data Types Numbers 172 Database Administration 270 Database field names 117 Database server 6 date 220 225 Date 308 date fields 74 109 dateAndTime 220 225 dateAndTimeNow 214 217 dateFromString 220 dateTime built in command 26 27 day 211 220 day month year 214 dayIndex 211 220 dayName 211 221 dayNames 214 dayOfMonth 211 221 dayOfWeek 214 WebBase User s Guide dayOfYear 211 221 daysInMonth 211 221 daysInMonth forYear 214 daysInYear 211 221 daysInYear 214 daysLeftInMonth 211 221 daysLeftInYear 211 221 decimal parameter 155 decode 86 192 Default parameter 19 36 43 default htf 36 43 default HTF 228 235 default htm 36 43 default HTM 226 degreesToRadians 173 DELETE 7 77 82 denominator 173 descending 200 describeHTMLRecord 237 describeHTMLRecord 237 describeVHTMLTable 200 describeVHTMLTable 200 Destination Directory 17 digitValue 208 directory 225 Directory Browsing 266 Directory parameter 18 36 43 DNS 6 Domains 6 dotProduct 181 drive 228 drive path file 226 drivePathName 228 drivePrefix 228 drives 230 Dynamic HTML 83 Dynamic vari
65. date the message is to be sent who the message is from who the message is to and the subject of the message Figure 16 5 shows the results of the Show Mail Queue option when there is a single envelope in the queue To present this display a mail message was queued for delivery at a later date to keep it in the queue If the mail service is not busy mail messages may not be in the queue long enough to see them as they are immediately sent from WebBase E Merge to the mail service for processing Figure 16 5 Show Mail Queue Display i WebBase 56 Mail Service 100 lines File Edit Status 17 lt gt Queue Fri 11 Apr 1997 11 57 19 dt 04 11 97 11 54 53 fr vendor companyB com to customer AcompanyA com re Order Confirmation 16 lt gt Queue has 1 entry e Status gt Flush Mail Queue This option is only active if there are entries in the mail queue A confirmation dialog is presented indicating the number of mail messages that will be deleted If so confirmed all entries are removed from the mail queue e Status gt Show In Process Mail If selected the first line added to the window indicates the number of entries currently being processed mail processes have been created but the process has not yet completed sending the mail Subsequent lines display for each message being processed in the queue the current date the date the message is to be sent who the message is from who the message is to and the subject of the message T
66. described for the Late Breaking News Window WebBase User s Guide e Edit gt Clear All this menu option provides the same functionality as described for the WebBase Transaction Service Window Note that this only clears the display and does not have any effect on entries in the MailQueue e Edit gt Find this menu option provides the same functionality as described for the Late Breaking News Window e Edit gt Find Again this menu option provides the same functionality as described for the Late Breaking News Window e Edit gt Set Lines this menu option provides the same functionality as described for the WebBase Transactions Service Window The global variable mailMaxLines can also be set to specify the number of lines on this window e Status gt Posting enabled If this option is selected information will be written to the window If the option is turned off no check mark is displayed next to the option no data will be written to the window For example the user can select the Show Stats option and nothing will be displayed in the window if posting is disabled However mail will still be sent and if mail logging is enabled log records will be written to disk The display below shows the information displayed on the WebBase Mail Service Window when the Posting Enabled option is turned off and then back on The variable mailPostingEnable can be used to control whether Posting is enabled or disabled by default it is
67. disabled e Puser the name of the user to be used by the sql macro This can be created as a global user or local variable or overridden explicitly in the sq macro using the user keyword argument It defaults to an empty string e varList The varList variable is specified by the user in conjunction with having a form return more than one variable using the same name This is common when a form may contain a series of checkboxes using the lt SELECT MULTIPLE gt lt SELECT gt construct where the user is requested to select none one or many items as desired to satisfy a request An example form with multiple checkboxes is presented below in Fig 9 36 WebBase User s Guide 153 Chapter 9 Variables 154 Example 9 35 Example form with multiple checkboxes lt B gt Select a body style lt B gt lt P gt You can select as many different body styles as you like lt P gt lt PRE gt lt FORM METHOD GET ACTION test htf gt lt INPUT TYPE checkbox NAME modtype value convertible gt Convertible lt INPUT TYPE checkbox NAME modtype value minivan gt Minivan lt INPUT TYPE checkbox NAME modtype value truck gt Truck lt INPUT TYPE submit VALUE Submit Query gt lt PRE gt The resultant GET command for such a list should the user select multiple checkboxes might appear as GET test htf modtype convertiblesgsmodtype minivan modtype
68. elements in it have been removed from the receiver removeFirst e g f cltn removeFirst gt one returns the first element in the receiver after it is removed from the receiver removelndex e g f 2 cltn removelndex OrderedCollection one three returns the receiver after the element at the index position specified in the argument is removed removeLast e g f cltnl removeLast gt three returns the last element in the receiver after 1t is removed from the receiver WebBase User s Guide Ordered Collection Class Operations The OrderedCollection class can be accessed using the variable OrderedCollection note there is no space between Ordered and Collection in either the variable or class name This section covers those operations that are sent to the OrderedCollection variable The operations described above for general collection classes are also applicable for this variable e new e g f OrderedCollection new gt OrderedCollection returns a new empty ordered collection capable of holding 12 elements When the number of elements in the collection exceeds the collection size the collection is grown by creating a new larger empty ordered collection and copying all the elements from the small collection into the larger collection Depending on the sizes of the collections this can be a performance issue If the size of the collection to be created is known when the collection is created th
69. enabled If the user is logging to disk and not actually sitting at the server there is probably no need to post mail transactions and the variable can be set to false to disable posting Posting does add overhead because of the I O required to display information on the window Figure 16 2 Enabling Disabling Posting Display ES WebBase 56 Mail Service 100 lines OF x File Edit Status 3 lt gt Service active as of Fri 11 Apr 1997 11 44 29 2 lt gt Service active as of Fri 11 Apr 1997 11 44 25 window disabled 1 lt gt Service active as of Fri 11 Apr 1997 11 34 22 e Status gt Start Mailer This option is only available if the Stop Mailer option was previously selected If selected the checking of mail in the queue is resumed e Status gt Stop Mailer this option is only available if the mail service is currently active If selected the checking of mail in the queue is stopped Any in process mail is completed This option does not affect the status of writing to the WebBase Mail Service Window If one stops the service any mail in process will continue being sent and any messages being posted as a result of this in process mail will continue to be written to the window if Posting is enabled The mail service can be resumed by using the Start Mailer option WebBase User s Guide 285 Chapter 16 E Merge However 1f the Mailer is stopped and the WebBase Mail Service Window is closed the Mailer is automatically
70. error message Microsoft ODBC Microsoft Access 7 0 Driver Too many client tasks The above error has been noted by a number of WebBase users and is based upon the fact that Microsoft s Jet database engine versions 1 1 2 0 and 2 5 can only be used by 10 client applications simultaneously on any one machine WebBase to boost database performance caches ODBC connections by default and can quickly cause more than 10 simultaneous connections to be established with MS databases using this Jet database engine Note again this limitation is with the total number of simultaneous connections via the Jet database engine not to any one data source This Jet database engine is used for MS Access MS dBase MS Excel MS FoxPro MS Paradox and MS Text ODBC Driver interfaces so any combination of the above data sources are included in this limitation We have confirmed that this is not an issue with the Microsoft ODBC Desktop Driver Pack 3 0 Jet 3 0 During testing we were able to access many more than 10 data sources via this driver with simultaneous cached connections in WebBase Microsoft ODBC Desktop Driver Pack 3 0 and later releases however are targeted for Windows 95 and Windows NT 4 0 Operating Systems only User s running earlier versions Windows 3 1 Windows for Workgroups or Windows NT 3 5x cannot take advantage of this fix To assist WebBase users on these earlier operating systems WebBase has been modified to alleviate al
71. examORO header gt an OdbcRowHeader returns the row header of the receiver e indexFor e g f Price examORO indexFor gt 10 returns the integer index of the field with the name specified in the argument The name may be either a string or a symbol e isCurrencyCol e g f Price examORO isCurrencyCol false returns true if the column with the name specified in the argument has a type of Currency otherwise false e isNumeric e g f Price examORO isNumeric true returns true if the column with the name specified in the argument has a type of Number otherwise false e isYesNo e g f Price examORO isYesNo gt false returns true if the column with the name specified in the argument has a type of Yes No otherwise false e printField on e g set stream String new YoWriteStream on f 1 stream examORO printField on stream contents gt 26 returns the receiver after adding the properly formatted description of the field specified in the first argument to the stream specified in the second argument e printHRecord e g f examORO printHRecord gt lt tr gt lt td gt 26 lt td gt lt td gt 92 lt td gt lt td gt BMW lt td gt lt td gt 318 IS lt td gt lt td gt 4 lt td gt lt td gt 5 Speed lt td gt lt td gt 2 Door lt td gt lt td gt Red lt td gt lt td gt 3000 lt td gt lt td gt 22900 0 lt td gt lt td gt true lt td gt lt td gt false lt td gt lt td gt Pass
72. example dat fileDir File newFile in a FileStream on example dat returns a file stream with path name specified by the first argument in the directory specified in the second argument open in e g set fileDir cMttpwbwizarWN Directory pathName f default htf fileDir File open in gt a File on default htf returns a file opened on the file named in the first argument in the directory specified in the second argument Note that this operation returns a file most of the other operations return a file stream pathName e g f c ittp wbwizard default htf File pathName gt a FileStream on default htf returns a file stream on the path named by the first argument pathName in e g set fileDir c http wbwizard Directory pathName f default htf fileDir YoFile pathName in gt a FileStream on default htf returns a file stream on the path named by the first argument with the default directory specified in the second argument pathNameReadOnly e g f c ittp wbwizard default htf oFile pathNameReadOnly gt a FileStream on default htf returns a file stream on the path named by the argument the file stream allows only read access pathNameReadOnly in e g set fileDir c http wbwizard Directory pathName f cNittp wbwizard default htf fileDir File pathNameReadOnly in gt a FileStream on default htf returns a file stream on the path na
73. file that is already open f strBuf strBuf size 1 myFile2 writeBuffer ofSize atPosition gt a File on fileExam htf WebBase User s Guide returns the receiver after writing the number bytes specified in the second argument of the first argument into the receiver file at the position specified in the third argument File Class Operations The File variable provides access to the File class which includes a number of useful Operations as described below changeModeOf to e g f cWittpwbwizarMdefault htf Hr File changeModeOf to gt File f cNhttp wbwizard default htf n File changeModeOf to gt File change the attributes of the file named in the first argument to those of the attribute in the second argument Valid types of attributes are r read only h hidden s system a archive All attributes can be unset by specifying an attribute other than r h s or a this is shown in the second example above copy to e g f c attp wbwizard default htf c attp wbwizard default htm File copy to gt true copy the file named in the first argument to the new file named in the second argument Return true if the copy is successful otherwise false drive path file e g f c ittp wbwizard default htf File drive path file gt cMittp wbwizard default htf returns the file path name of the file name Note that the drive must be a character the path and file are strings execute
74. first e alignDollar e g f 123 examORO alignDollar gt 123 returns a string in which the argument has been properly formatted to represent a dollar value e g a at the start The alignDollar operation provided by String is more useful since it allows a width of the resulting string to be specified e at e g f 1 examORO at gt 26 returns the value of the field at the specified key argument The argument may be a string or symbol or number e colTypeOf e g f 1 examORO colTypeOf gt 4 returns the column Sql type of the field at the specified key argument e columnNames e g f examORO columnNames ID Year Maker Model Cylinders Transmission Kind Color Mileage Price Air Cruise Category Country returns a collection of the column names WebBase User s Guide e columnSqlTypes e g f examORO columnSqlTypes gt 4 5 12 12 6 12 12 12 4 8 7 7 12 12 returns a collection of the column names The different sql types are Example 11 6 SQL Types BIT gt 7 TINYINT gt 6 BIGINT gt 5 LONGVARBINARY gt 4 VARBINARY gt 3 BINARY gt 2 LONGVARCHAR gt 1 HAR gt 1 NTEGER gt 4 MALLINT gt 5 LOAT gt 6 EAL gt 7 DOUBLE gt 8 DATE gt 9 TIME gt 10 TIMESTAMP gt 11 VARCHAR gt 12 DEFAULT gt 99 DUIAHUZA e colWidthOf e g f 1 exa
75. gt returns the not greater than gt sequence of characters e F NLT e g lt returns the not less than lt sequence of characters e ODBCcache e g OrderedCollection an OdbcConnectionCache myAccess fred7 Microsoft Access Driver mdb 1 03 10 97 12 22 58 PST 03 10 97 12 22 58 PST 0 0 0 13 the collection of connection handles that are currently cached See Chapter 12 for information on caching and ODBC connections See also ODBCcacheHTML e ODBCcacheHTML e g see below formats the information on the connections stored in the ODBC cache for a nice printout on the browser For each connection the source username and password are initially specified The type of ODBC driver is then indicated as well as how many times the handle has been used when it was created when it was last used when it was cached and how long it has been since it was used See also ODBCcache Example 9 25 ODBCcacheHTML display ODBC Cache source user password driver count created lastused time_cached time_idle 1 e myAccess fred Microsoft Access Driver mdb 1 03 10 97 12 22 58 PST 03 10 97 12 22 58 PST 0 0 0 13 e ODBCdrivers e g SortedCollection Microsoft Access Driver mdb gt Usage Count 6809923 APILevel 1 ConnectFunctions YYN DriverODBCVer 02 50 FileUsage 2 FileExtns mdb SQLLevel 0 ConectFunctions YYN etc a collection of available
76. gt o e map e g f asInteger 1 2 3 parseAt map 1 2 3 f asUppercase str map gt ABC returns a new collection in which each element in the receiver has had the operation in the argument performed on it This is useful for converting a collection of strings identifying numbers into a collection of numbers The argument must be a symbol 1 e preceded by the sign e map for e g f lt 2 numCltn map for false false true returns a new collection generated by applying the given method first argument to the target second argument and taking each member of the receiver in turn as an argument The example is for illustration only the receiver does not have to be a collection containing only numbers e map with e g f 5 numCltn map with gt 6 7 8 returns a new collection in which each element in the receiver has had the operation in the first argument performed on it The operation in the first argument requires an additional WebBase User s Guide 183 Chapter 11 Expressions 184 argument which is specified in the second argument The example is for illustration only the receiver does not have to be a collection containing only numbers max e g f numCltn max gt 3 returns the largest number in the collection Only numeric values in the collection will be processed non numeric values will be skipped min e g f numCltn min gt 1 returns the smallest number in the collec
77. gt 0 TCP IP SoLinger gt Onoff 0 Linger 0 43 lt gt 0 TCP IP SoDontRoute gt false 42 lt gt 0 TCP IP SoReuseAddr gt false 41 lt gt 0 TCP IP SoDontLinger gt true 40 lt gt 0 TCP IP SoAcceptConn gt true 39 lt gt 0 TCP IP SoTcpNoDelay gt false 38 lt gt 0 TCP IP Microsoft Windows Sockets Version 1 1 WebBase User s Guide Chapter 5 WebBase Windows WebBase Transactions Text Window The WebBase Transactions text area shows information about each transaction handled by WebBase The information is presented in the format lt gt data Each line starts with an entry number When the window is first displayed the first entry number is 1 As each additional entry is added to the window the entry number is incremented The number of entries maintained in the text area will not exceed the number of lines that the user has specified in the Set Lines menu option The information displayed after the entry number may be activation information message handling information or error information When the window is opened the first entry is always of the form 1 lt gt Service active as of Fri 14 Mar 1997 11 42 29 When WebBase processes requests the information displayed is the same as that written into the WebBase log files The specific format of the log information is controlled by the LogFormat parameter In the examples in this section the default LogFormat of 2 Extended
78. gt 11 April gt 4 September gt 9 Sep gt 9 Aug gt 8 Apr gt 4 May gt 5 Jun gt 6 June gt 6 returns a dictionary The key of each association is the month name as a symbol the value is the month index Note there is an association for the full name and the short name of each month e g Jan January nameOfDay e g f 3 Date nameOfDay gt Wednesday returns the weekday name as a symbol corresponding to the integer argument Monday for 1 Sunday for 7 nameOfMonth e g f 3 Date nameOfMonth gt March returns the month name as a symbol corresponding to the integer argument January for 1 December for 12 newDay month year e g f 15 June 1997 Date newDay month year gt 06 15 97 returns a date with the day specified in the first argument the month in the second argument and the year specified in the third argument The day and year are specified as integers the month is a symbol newDay year e g f 89 1997 Date newDay year gt 03 30 97 returns a date with the day specified in the first argument and the year specified in the second argument The date is an integer representing the number of days since the first of the year pathToday e g f Date today Date pathToday gt 970318 returns a six digit string in the format yymmdd using the date specified in the argument shortNameOfDay e g f 2 Date shortNameOfDay gt Tue returns the sh
79. gt three two one f strl reverse gt cba returns a new collection in which the elements in the receiver have been reversed i e the first element in the receiver is the last element in the returned collection This can also be written as reversed e size e g f cltnl size gt 3 f size gt 0 returns an integer defining the number of elements in the collection e sum e g f numCltn sum gt 6 returns the sum of all the numbers in the collection Only numeric values in the collection will be processed non numeric values will be skipped General Collection Class Operations This section describes all the operations that can be performed on an of the collection classes accessed using the variables Array OrderedCollection OrderedList SortedCollection SortedList and String e with e g f one Array with one returns a new collection with only one element the argument e with with e g f one two OrderedCollection with with gt OrderedCollection one two returns a new collection with two elements the first and second arguments e with with with e g f one 2 3 0 Array with with with one 2 3 0 returns a new collection with three elements the first second and third arguments e with with with with e g f one two three four SortedList with with with with SortedList
80. htf and default htm in that order This parameter can be specified WebBase User s Guide as a single file name or as a series of files to be searched for in the order presented index htm index html separated by commas If the parameter is specified with no filename then no default file will be used e Extension optional the default extension or extensions to append to a file name should the user enter what appears to be a file reference without an extension Default value is htf htm in that order This parameter can be specified as a single extension or as a series of file extensions to be searched for in the order presented htm html separated by commas If the parameter is specified with no extension then no default extension will be appended to the file name to attempt to resolve it for the user Note Only the extension characters are specified the period preceding the extension is not included in this parameter e HostName optional the DNS name identifying the default host system This is used to generate the fullHostName and serverHostName variables if the browser does not provide a Host header variable The form designer can use these variables to do redirects using a DNS name instead of an IP address It is important to remember that this name is NOT being used for name resolution of the host name used within a URL that is done by the TCP IP configuration where the domain name and possibly m
81. include macro serves the same purpose as the insert macro Its syntax is slightly different in that when the filename is not presented as a string enclosed in single quotes it is treated as a filename as for example file HT F or subdir file HTF include address htf e print lt args gt print The text contained within the print macro is not processed by WebBase but is inserted into the output HTML exactly as encountered Variables and other macro keywords are not processed but are printed with their enclosing characters as entered in the htf file This macro has been superseded by the output macro If the optional argument convert is specified all lt and gt characters are converted to the character sequences zlt and amp gt respectively so that HTML forms can be printed as part of the text rather than being interpreted by the browser An optional keyword value argument include filename indicates that the print macro is to take its text from another file see the include macro for a description of the filename specification options This facility allows one to print the contents of an included file rather than including the file to be processed by WebBase Note since the purpose of the print macro is to insert text that is to be printed and not processed by WebBase WebBase does not parse the information within the print print area For this reason after encountering the opening print keyword WebBas
82. information entered by the user is passed back to the first form and redisplayed with a request to correct it One of the big advantages of using user variables is that the amount of information to be passed between forms can be substantially reduced In Example 7 a number of command line arguments are passed from the first form to the second to indicate the values the user entered into the input fields After the error checking has been completed it may be necessary for the user to correct some of the entered information WebBase User s Guide 161 Chapter 10 User Variables 162 If user variables were not used the FORM redirect or anchors used on the second page to return back to the first page would have to include all of the input arguments and their values This is a lot of information to be set up properly by the form designer In addition all the information must be sent as part of the browser request that can generate a large request Instead user variables are used The first forms create a token local variable using WebBaselD It passes this as a hidden variable to the second form along with all the other variables generated from the input statements On the second form the token local variable is received and set up as the name of the user variable dictionary All the other input local variables such as name and address are stored as user variables The error checking is performed and the error information is stored as
83. installation Abort As noted above the WBSetup exe program allows either a standard or easy installation and a custom installation The dialog shown in Fig 3 4 allows the user to identify which type of installation should be done The Easy Install will install all appropriate files for the given operating system as well as the WebBase WebWizard The Custom Install gives you the ability to select individual components to install as well as optionally installing the WebBase WebWizard The Custom Installation is described later in this chapter Chapter 3 Installation Figure 3 4 Installation Option Dialog Installation Selection Ea Se eci ane af the installation apiians below Easy instal Easy Install asks the minimum number of questions during the installation process and installs all necessary components for your Windows 95 environment Easy Install is HIGHLY RECOMMENDED Easy Install for the first time user of WebBase Custom instal Custom Install allows you to select individual components of the WebBase application to be installed in your Windows 95 environment This process assumes that you are familiar with the WebBase application so as to know what minimum components are Custom Install required for a successful installation Help You are then asked to specify where the software is to be installed on the WebBase Directories Dialog shown in Fig 3 5 The recommended default
84. integerCos 174 integerSin 174 intSqrt 177 IP address 43 57 135 IP Address 6 isAlphaNumeric 208 isArray 170 isAssociation 170 isBoolean 170 isCharacter 170 isCollection 170 isCurrencyCol 238 isDictionary 170 isDigit 208 isDirectory 171 isEmpty 184 206 231 isFloat 171 isFraction 171 isInteger 171 isLetter 209 isList 171 isLowercase 209 isLowerCase 209 ISMAP 7 147 261 isNil 171 isNull 171 312 isNumber 171 isNumeric 238 240 isPoint 171 isSeparator 209 isSortedList 171 isStream 171 isString 171 Issue single heartbeat Menu Option 68 isSymbol 171 isTrue32bit 247 isUppercase 209 isUpperCase 209 isValidDirectory 193 isValidFile 193 isValidIPaddr 194 isValidSource 249 isVowel 209 isWhitespace 209 isYesNo 238 240 J JavaScript 94 JOIN 74 K key 204 key 204 key value 204 keyAtValue 206 WebBase User s Guide keyName 241 keys 242 L last 184 LastModified 150 lastSundayIn 212 222 lastSundayInMonth 212 222 Late Breaking News Window 47 lcm 177 leapYear 215 leapYearsTo 215 License 58 License Agreement 15 License parameter 18 36 License wri 13 LicensedFeatures parameter 19 283 lineDelimiter 231 lineDelimiter 231 In 174 Load Global Variables Menu Option 54 124 Local variables 81 99 100 103 105 115 118 localMachine 243 Location
85. is greater than 10 but less than 20 Here s how the RPN would be developed Example 11 3 Developing RPN Statements condl is set true if varl gt 5 otherwise it is set false set condl 5 varl gt set cond2 abc strl containsString set cond3 10 var2 gt set cond4 20 var2 lt the and ing of var2 gt 10 AND var2 lt 20 set cond5 cond3 cond4 amp set cond6 condl cond2 amp the solid vertical bar is the OR operator set cond7 cond5 cond6 I Now you can write if cond7 Example 11 4 Developing RPN Statements Continued if cond5 cond6 replacing cond7 by its expression if cond3 cond4 amp cond6 replacing cond5 by its expression if cond3 cond4 amp condl cond2 amp and so forth if 10 var2 gt cond4 amp condl cond2 amp if 10 var2 gt 20 var2 lt amp condi cond2 amp if 10 var2 gt 20 var2 lt condl abc strl containsString if 10 var2 gt 20 var2 lt 5 varl gt abc stri containsString Just go through the process one step at a time The sequence of set s and the if cond7 will work just fine They do add a little bit of overhead in the creation of the temp variables but they make it that much easier to understand WebBase User s Guide 11 2 General Operations The remainder of this chapter covers the different types of operations that can be performed on WebBase data types The user is
86. looking for another match in the user global or dynamic variables If a match is found whose value is nil returns an empty string e getGlobalVariable e g f aGlobalVar cmd getGlobalVariable gt returns the value of the global variable whose name matches the argument If no match is found returns nil and does not continue looking for another match in the dynamic variables If a match is found whose value is nil returns an empty string e getLetVariable e g f myLocalVar cmd getLetVariable gt returns the value of the first scope variable whose name matches the argument If no match is found returns nil and does not continue looking for another match in the local user global or dynamic variables If a match is found whose value is nil returns an empty string e getLocalVariable e g f myLocalVar cmd getLocalVariable gt returns the value of the first local variable whose name matches the argument No local scoping variables are checked If no match is found returns nil and does not continue looking for another match in the user global or dynamic variables If a match is found whose value is nil returns an empty string e getUserVariable e g f myVar cmd getUserVariable gt returns the value of the first user variable whose name matches the argument If no match is found returns nil and does not continue looking for another match in the global or dynamic variables I
87. lt CrLf gt 13 lt gt in Connection Keep Alive lt CrLf gt 12 lt gt 2 8 127 0 0 1 14 Mar 1997 10 49 57 0800 GET dateTime HTTP 1 0 200 496 Mozilla 3 0 Win95 1 WebBase User s Guide Status gt Trace outgoing headers This is a toggle on off option If tracing of outgoing headers is enabled a check mark is displayed next to the menu option If tracing of outgoing headers is disabled default no check mark is displayed If this option is selected the header records for the outgoing messages are displayed in the text window This is useful for checking out cookie messages and Last Modified header records If a user requests the date Time command the following information will be displayed some differences between systems will occur the display is for informational purposes only 34 lt gt out lt CrLf gt 33 lt gt out Content Length 120 lt CrLf gt 32 lt gt out Content Type text html lt CrLf gt 31 lt gt out Last Modified Tuesday 01 Jan 1901 01 01 01 GMT lt CrLf gt 30 lt gt out Expires Tuesday 01 Jan 1901 01 01 01 GMT lt CrLf gt 29 lt gt out Pragma no cache lt CrLf gt 28 lt gt out Date Friday 14 Mar 1997 18 52 05 GMT lt CrLf gt 27 lt gt out Set Cookie CookieCounter 3 path lt CrLf gt 26 lt gt out License lt CrLf gt 25 lt gt out Server WebBase 4 10 build 56 lt CrLf gt 24 lt gt out MIME Version
88. lt args gt sql The sql macro identifies the database that is to be queried allows for specifying a variable into which it can return its query results and defines the text block that constitutes the actual ODBC query statement The optional keyword value pairs supported by the sq macro are listed in the following table String The variable name into which the results will be placed If this argument is omitted the variable Yoresults will be used The value of this keyword must be a variable name it cannot be an expression or constant source String The ODBC source name If this argument is omitted the variable source will be used user String The user id for logging into the ODBC source If this argument is omitted the variable ouser will be used Note that some ODBC drivers do not require a username and password this is a database specific issue It is recommended that even though a username and password may not be required by the current ODBC driver that they be specified as part of the sql macro statement in case they are required by future ODBC drivers password String The required password for logging into the ODBC source If this argument is omitted the variable Zepassword will be used Note that some ODBC drivers do not require a username and password this is a database specific issue It is recommended that even though a username and password may not be required by the current ODBC driver that they be specif
89. lt val gt The setGlobal macro will create a name value pair as a global variable in memory only Unless the System Registry is modified the next time that WebBase is started this global variable will not exist Global variables created either with the setGlobal macro or within the System Registry can be removed from memory using the removeGlobal macro It is important to remember that both the setGlobal and removeGlobal macros only make in memory changes All permanent changes to global variables must be done in the System Registry Example 8 38 setGlobal Macro setGlobal myGlobalVar test setHeader lt var gt lt val gt The setHeader macro allows users to specify header values that will be returned to the browser For example the user can specify the Expires header information using this variable 104 WebBase User s Guide instead of using the expires dynamic variable If a browser receiving the header variable and value does not recognize or support the header variable it will normally just ignore it Example 8 39 setHeader Macro setHeader Expires UniversalTime now asString setLocal lt var gt lt val gt The setLocal macro is designed for use only with the scope macro to create a local variable that will exist after the scope macro is completed If scoping is not in effect this is equivalent to the set macro Example 8 40 setLocal Macro scope setLocal localVar test more WebBas
90. message and or provide a search mechanism for locating the message on the MailQueue using the findByID operation described later in this chapter If present this id value is shown in the header of the message as ID y vom e send This is an optional keyword If used its value is a UniversalTime object indicating when the mail is to be sent The default value is the value that would be returned by the dateTime variable at the time the mail macro is processed To queue the mail for future sending set a variable to the current time plus some number of seconds e g set time 600 dateTime addSeconds for 10 minutes from now then use this variable name as the value for the send keyword The send keyword also recognizes two string values now which means send the mail immediately same as the default and queue or just q which means queue the mail but do not send it In fact the mail is marked for sending approximately 1 year from the date of queuing for all practical purposes never As noted above the attach keyword can be used to specify attachments to be sent along with e mail message If the pathname has an extension of txt htf or hti it will be sent as a text attachment all others will be sent as a base64 encoded binary attachment Fully qualified pathnames may be preceded by a flag to specify some error and encoding information using the format i where 1 is a single digit integer between 0 and 7 For ex
91. message is generated This can be helpful in debugging htf forms It is recommended that this variable be created and its value set to true during forms development Once the forms have been debugged the forms WebBase User s Guide designer should remove any statements setting this variable to true to prevent displaying this information on browsers visiting their site e enablePrivateInternalCommands If set to true and disableAllInternalCommands is not set to true any dynamic variable can be called as if it were a built in internal command When a dynamic variable is invoked as a built in command the surrounding signs are removed from the variable name Thus localVariablesHTML allUserVariablesHTML reserved WordsHTML etc can be invoked directly from a browser without having to write a form to return them This can be useful during forms development on a development machine It is not recommended that this variable be enabled on a production system e errorMacroLines this variable is used when an error message is generated due to a form s designer programming error It defines the number of lines beginning with the start tag of the macro and number of lines ending with the end tag of the macro that will be displayed The center portion will be replaced by if the total lines exceed 2 errorMacroLines 1 It defaults to 5 If a value less than 2 is specified the entire macro is displayed e errorUseColor thi
92. not notNull returns true is the receiver exists equivalent to isNull not printOn return the receiver which is not modified Adds the appropriate representation of the receiver to the argument which must be a stream WebBase User s Guide 11 3 Numbers There are three different kinds of numbers supported within WebBase integers e g 12345 floats e g 123 45 and fractions 1 2 Number Instance Operations This section covers all the operations that can be performed on any type of number Operations specific to integers or floats or fractions are described in subsequent sections In general numbers are always instances There are no class operations that can be performed on numbers e g f 236 gt 3 returns the difference of the receiver and an argument eg i ff 33 gt 9 returns the product of the receiver and an argument e g f 3 10 0 gt 3 33333333 returns a number generated by dividing the receiver by the argument If both numbers are integers returns either an integer or a fraction If either number is a float returns a float II e g f 3 10 0 gt 3 returns an integer generated by dividing the two arguments the result is truncated M e g f 3 10 0 gt 1 returns the integer remainder after dividing the receiver by the argument the result is truncated eg fE 334 56 returns the sum of the receiver and an argument lt e g set Price 29 95 f 100 Price lt gt
93. not paused no check mark is displayed If this option is selected and the server is active the confirmation dialog shown in Fig 5 4 is displayed If the user confirms that the server should be paused the status line in the window is redisplayed in red and the remainder of the window is displayed in blue green While the server is paused it will return a 503 The Server is Too Busy status code and message back to any requesting browsers Although some server resources are required to handle the incoming requests and return the status they are very minimal If this option is selected and the server is paused the server will be re activated without any confirmation from the user Pausing the server is useful to administer databases without having to shut down the server and without having to wrap errorProtect statements around forms that would otherwise generate errors Alternative approaches to database administration are presented in Chapter 14 WebBase User s Guide Figure 5 4 Pause Server Confirmation Dialog Please Confirm Pausing the Server will cause any incomming commands to receive a 503 Too Busy error 2 Pause the Server e Close All Connections If this option is selected the confirmation dialog shown in Fig 5 5 1s displayed If the user confirms that all connections should be closed all commands in progress will be closed and the associated communications sockets will be closed This option is also provide
94. object with 0 1 or many entries depending on how many envelopes match the specified criteria findByDate e g f dateTime MailQueue findByDate returns a Mail List containing entries whose send field matches the date in the argument Note the send field expects a Universal Time such as is returned by the dateTime global variable findByFrom e g f WebMaster ExperTelligence com MailQueue findByFrom returns a Mail List containing entries whose from field matches the argument findByID e g f anID MailQueue findByFrom returns a Mail List containing entries whose id field matches the argument findByTo e g f Fred companyA com MailQueue findByTo returns a Mail List containing entries whose to field matches the argument findBySubject e g f New Product Announcement MailQueue findBySubject returns a Mail List containing entries whose subject field matches the argument WebBase User s Guide 16 6 Envelopes An envelope contains a mail message that has been queued in a mail list It contains the mail message along with all the necessary addressing and time to be sent information accumulated from both the mail macro and the body of the mail message Envelope Instance Operations The following operations can be sent to any entry in a Mail List maillD e g f MailQueue first mailID returns the value of the id field of the
95. plus header variables sent by the browser cookieTags e g f cmd cookieTags gt path Returns the accumulation of the cookiePath YcookieDomain and YcookieExpires variables as a string that gets appended to all outgoing cookies Because the user can set any of these variables the results displayed will vary depending on the current values of the above three cookie variables Only Y cookiePath has a default which is shown in the example above cookieWebBaseld e g f cmd cookieWebBaseld gt WebBaseID W14697403E161808318469B path This is a default cookie that WebBase always generates and sends out to the browser to see if it can establish a cookie connection This value is used as the default userName for user variables if the browser responds with the WebBaselD cookie The example above defines the cookie WebBaselD and has the cookieTag with the cookiePath default appended enumerateHTML titled e g f localVariables Local WebBase Variables enumerateHTML titled lt See output of localVariablesHTML gt Creates an HTML lt UL gt lt LI gt lt UL gt bulleted list of the dictionary or collection which is the first argument with the title being the second argument It is used by dynamic variables like localVariablesHTML and is a useful formatting tool for displaying any type of collection or dictionary flash e g f this is a test Yocmd flash Flash this is
96. provides two operations on strings for handling field names The asFieldName operation adds double quotes around the specified string The asFieldNameName operation removes double quotes from the specified string Examples of these operations are found in Chapter 11 As noted above field variables are at the top of the precedence order If you are using a local variable called Name and retrieve records from a database in which there is a field called Name the field variable Name will take precedence over the local variable This can cause unexpected errors in form processing 9 2 Local Variables 118 Local variables are in existence for the duration of the form that is being processed As soon as the WebBase server completes the processing of the form and returns the output stream to the browser all local variables cease to exist Maintaining state across multiple forms can be done using user variables as described in Chapter 10 Local variables can be created four ways e by passing arguments into a form via the command line e by explicitly setting them using a WebBase macro e from the header information on the request from the client e from the cookies sent from a cookie enabled browser to the server Local Input Variables Local input variables are created from command line arguments that are passed in from one form to another A full URL GET request including command line arguments uses the format http lt IP address gt
97. re establish the sockets interface It is recommended that the window be left open and iconified When a mail message is submitted to the queue for immediate delivery or if the delivery date of an envelope in the queue has arrived an entry is made on the WebBase Mail Service Window Starting Mail Service The specified is the unique process number assigned to handle the piece of mail it may be displayed with other information in the window e g if messages are being traced This identification number is automatically assigned to the process Once the process is completed subsequent processes may reuse the number Menu Options The following are the options available from the pull down menu bar at the top of the WebBase Mail Service Window e File gt Exit if this menu option is selected the WebBase Mail Service Window is closed The WebBase Mail Service Window will automatically be opened whenever a message from the Mail Queue is removed and sent If the window is explicitly closed it will be reopened the next time a message is to be sent It is recommended that the window be kept open and iconified to reduce the processing overhead required to set up the sockets interface associated with the window and the sending of mail messages e Edit gt Cut this menu option provides the same functionality as described for the WebBase Transaction Service Window e Edit gt Copy this menu option provides the same functionality as
98. representing the date and time of the receiver Uses the OS to determine 12 hour or 24 hour format asDateTimeWithPicture e g f MMM dd yyyy otsVarl asDateTimeWithPicture gt Mar 11 1997 02 37 38 PM returns a formatted string of the receiver s date and time with the date portion displayed according to the picture string The time portion will be formatted as in the asDateTime method See Date printWithPicture for the formatting details See also asDateTime12withPicture and asDateTime24withPicture asDateTimel2 e g f otsVarl asDateTime12 03 11 97 02 37 38 PM returns a string representing the date and time of the receiver 12 hour format WebBase User s Guide e asDateTimel2WithPicture e g f MMM dd yyyy otsVarl asDateTime12WithPicture gt Mar 11 1997 02 37 38 PM returns a formatted string of the receiver s date and time with the date portion displayed according to the picture string The time portion will be formatted as in the asDateTime12 method See Date printWithPicture for the formatting details e asDateTime24 e g f otsVarl asDateTime24 03 11 97 14 37 38 returns a string representing the date and time of the receiver in 24 hour format e asDateTime24WithPicture e g f MMM dd yyyy otsVarl asDateTime24WithPicture Mar 11 1997 14 37 38 returns a formatted string of the receiver s date and time with the dat
99. sl Differences between browsers on the way that empty input fields are handled have been noted For example Netscape passes all variables as command line arguments whether a value is entered or not MSTE only creates command line arguments for those variables for which the user entered a value Itis always recommended that form designers check the command line arguments that are received and take appropriate action depending on which variables are or are not received It should be noted that the browser behavior described here may change with future versions of the browsers 80 WebBase User s Guide http lt hostURL gt getname htf name Denny The ACTION attribute of the FORM was getname htf There was a single INPUT tag within the FORM whose name was name The value typed into the input field was Denny this was also the default value specified for the field The browser combined all this information to generate the URL shown above 7 3 Processing Input from a Form After the user has entered information into a form and indicated that they wanted to proceed another form is invoked This form should address two issues verifying that the user entered proper information and processing the information entered by the user WebBase automatically creates local variables for each of the command line arguments sent by the browser Any WebBase variable names specified in the htf file within curly braces e g name are automatic
100. than or equal to the argument using a sort order character comparison otherwise false e asCharacter e g f X asCharacter gt X returns the receiver since it is already a character e asciiValue e g f X asciiValue 88 returns an integer representing the ASCII value for the receiver e asinteger e g f X asInteger gt 88 returns the integer ASCII value for the receiver this is the same as the ascii Value message e asLowercase e g f X asLowercase gt x returns the lowercase character for the receiver if it is an alphabetic character otherwise returns the receiver as is This may also be written using asLowerCase e asUppercase e g f x asUppercase gt X returns the uppercase character for an the receiver if it is an alphabetic character otherwise returns the receiver as is This may also be written using asUpperCase e authDecode e g f w authDecode gt 48 return an integer representing the character as per RFC 1421 See the number method authEncode also e between and e g f A Z X between and gt true returns true if the receiver is between the first and second arguments when doing a sort order character comparison e digitValue e g f W digitValue gt 32 returns a number corresponding to the digit value of the receiver Only the characters 0 9 and A Z are valid as a receiver note that the lowercase alphabetic characters are not valid e isAlphaNumeric e g f X isA
101. the Add New Key anchor and entering Domains as the key name Remember that this name is case sensitive Select the Open anchor next to the Domains key All of the WebBase multiple domains are specified as subkeys in the displayed table To create a new multiple domain select the Add New Key anchor and enter the IP address of the domain This domain must also be set up within the TCP IP configuration accessible via the Network option within the Windows Control Panel Select the Open anchor next to the desired multiple domain key The entries table indicates whether any parameters have been defined for this domain WebBase User s Guide WebBase User s Guide 45 12 To add a parameter select the Add new entry anchor and specify the parameter name and desired value Parameters should only be defined to override the default parameter value 13 To modify a parameter select the Edit anchor next to the parameter and specify the changed value 14 The subkey table indicates whether any aliases or extensions have been defined for this domain To create extensions or aliases follow steps 8 11 from the preceding sections on Extensions or Aliases respectively to create the subkey within the registry and then define appropriate extensions or aliases 15 Stop and restart WebBase so that the new modified multiple domain information will take effect Chapter 4 Initialization 46 WebBa
102. the dictionary name is specified as the string constant all WebBase will remove all user dictionaries from memory User Variable Dictionary Maintenance WebBase periodically performs maintenance on user variable dictionaries to ensure memory is managed in a reasonable fashion It will check the accessed and expires values of all dictionaries once per minute and remove those that have expired In addition a WebBase administrator can limit the number of user dictionaries that can exist at a single time The variable userLimit can be overridden to indicate the total number of dictionaries that can be created WebBase will remove the least recently accessed dictionaries that exceed this limit regardless of their expiration status By default there is no limit on the number of user dictionaries From the host server the administrator has one Options menu items to interact with the user dictionaries within WebBase The Remove All User Variables menu item causes WebBase to remove all user dictionaries regardless of their expiration status This last option should be used with great care If there are users interacting with forms in which user variables are used the users may get unexpected results or errors if all the user variable dictionaries are removed 10 3 Using User Variables in WebBase The initial concept of cookie support on browsers was to allow state to be maintained in a session between a browser and a server Not
103. the file date Time htf and it was stored in the top level forms directory the file and not the built in command would be invoked if the user issued a URL of the form http 127 0 0 1 80 dateTime The following are the WebBase built in commands and an example of what they display e build e g WebBase 4 10 build 56 displays the current WebBase version and build number in bold e buildString e g WebBase 4 10 build 56 displays the current WebBase version and build number in standard font e dateTime e g Date Tue 06 May 1997 09 07 12 PDT displays the current date and time e elapsedTime e g Elapsed time 60ms displays the amount of time that has elapsed since processing was begun for this command by the server e gmt e g Date Tue 30 Apr 1996 15 23 43 GMT displays the current date and time in GMT format e milliseconds e g 30259110 displays the total number of milliseconds since the previous midnight e seconds e g 30312 displays the total number of seconds since the previous midnight e title e g WebBase 4 10 displays the current WebBase version number in bold e titleString e g WebBase 4 10 displays the current WebBase version number in standard font 3 7 Installing ODBC Drivers It is not required that you install ODBC when WebBase is installed It is possible to install WebBase get it up and running and experiment with some of the forms and examples without having ODBC installed
104. the pull down list select HKEY_LOCAL_ MACHINE and then press the OPEN button Select the Open anchor next to the SOFTWARE key Select the Open anchor next to the ExperTelligence Inc key Select the Open anchor next to the WebBase key Select the Open anchor next to the 4 10 key If the key Variables does not exist create it by selecting the Add New Key anchor and entering Variables as the key name Select the Open anchor next to the Variables key All of the WebBase global variables currently defined and their values are displayed in the table To add a new global variable select the Add new entry anchor and specify the global variable name and desired value To modify a parameter select the Edit anchor next to the parameter and specify the changed value From the WebBase Server Window select the Load Global Variables option to reload the global variables WebBase User s Guide 125 Chapter 9 Variables 9 4 Dynamic Variables Dynamic variables are similar to the global variables described above in that they are available for use in any htf form However unlike global variables in which the user defines their value WebBase sets the values of dynamic variables A user can override the value of a dynamic value by creating a global variable of the same name following the procedures described in the previous section
105. the same number of cells although the contents will usually differ It is not the purpose of this chapter to provide extensive information about SQL However database interactions via WebBase are done using SQL statements The primary SQL statements are presented here along with an example of how they would be implemented in WebBase code Users who are unfamiliar with SQL might want to consider finding a good reference book about SQL usage or search the Internet for information or tutorials on using SQL Each ODBC compliant database implements many of the SQL statements The reference materials provided with a user s particular database may also provide information about SQL statements SELECT The SELECT statement is used to retrieve one or more rows of data from a table This is the SQL statement most frequently used both in general database interactions as well as with WebBase The table below is a portion of the Cars table provided with WebBase and used in the WebBase database examples Example 6 1 Sample Database Table Cars 1967 CITROEN DDSII 4 Speed 100000 3000 00 Door 2 1985 MERCEDES SE Automatic 4 White 69000 19500 00 Door 1969 PORSCHE 911E 5 Speed 75000 4900 00 Door SELECT General Usage To retrieve all the records from the table the following statement would be used SELECT FROM Cars The SELECT indicates the type of database query that will be done in this case some recor
106. the two files as pathname strings Example 16 2 shows how attachments can be done within a mail macro Example 16 1 Mail Macro sql to addressees source business SELECT Email Name Title Product FROM clients WHERE OrderStatus IN_HOUSE sql if 0 addressees size gt forRow aRow on addressees set subj is in Product mail to Email subject subj from OrderEntry BestCompany com bec Sales BestCompany com Dear Title Name We re glad to inform you that the Product you ordered is now in stock and mail forRow if Example 16 2 Mail Macro with Attachments 16 4 292 Encode a gif file for sending to multiple people This makes the sending more efficient since it does not have to b ncoded for each person it is sent to f false c http wbhwizard Wizard gif c temp encoded gif base 64encodeFile to Generate th mail messages mail to you CompanyA com them CompanyA com from me CompanyB com organization Company B Inc subject sending attachments attach c http wbwizard default htf c http wbhwizard dbex autos mdb e http wbowizard Wizard gif 4 c temp encoded gif I am sending you 4 attachments 1 text file 1 Access database file and 2 gif images The second image is a previously base64 encoded file It is the same as the first image During the processing and sending of the mail the fir
107. true returns true if the receiver is less than the argument otherwise false lt e g set Price 29 95 f 100 Price lt gt true returns true if the receiver is less than or equal to the argument otherwise false e g set Price 29 95 f 100 Price gt false returns true if the receiver is equal to the argument otherwise false gt e g set Price 29 95 f 100 Price gt gt false returns true if the receiver is greater than the argument otherwise false gt e g set Price 29 95 f 100 Price lt gt false returns true if the receiver is greater than or equal to the argument otherwise false abs e g f 10 abs gt 10 returns the absolute value of the receiver alignDollar e g f 7 123 45 alignDollar gt 123 45 returns a string representing the receiver as a dollar amount The argument defines the number of characters to be contained in the resulting string spaces are added on the left for padding if necessary If the total number of digits plus the sign are more than the WebBase User s Guide 171 Chapter 11 Expressions 172 specified field width argument the returned string will be longer than the specified value truncation is not performed arcCos e g f 0 arcCos gt 1 57079633 returns the arc cosine an angle in radians of the receiver arcSin e g f 0 5 arcSin gt 0 52359878 returns the arc sin an angle in radians of the receiver arcTan e g f 1 4 arcT
108. value entered by the user into the field are passed as command line arguments and become a WebBase local variable It is also possible to set up a default value for an INPUT field this is done using the VALUE attribute The value of this attribute can be a constant or a WebBase variable The SELECT tag provides a list of values for the user to select from The values are given in lt OPTION gt elements As with INPUT fields each SELECT tag has an associated NAME attribute that must be specified The WebBase variable varList is used to create a WebBase variable containing the multiple selections see Chapter 9 for more information on this variable The TEXTAREA tag is used to allow a user to type in multiple lines of text It is usually used as a free form message area The content of the field is used as the default value The rows and columns determine the size of the text area A FORM will generally include some type of button or other mechanism so that the user can indicate that their interactions with the form are complete and they are ready for their data to be processed When such an indication is provided the browser builds a URL starting with the file URL specified as the ACTION attribute of the FORM statement It appends name value pairs to this URL one pair for each named tag entity within the FORM The browser then sends out the URL to the server for processing In the example presented earlier the GET query generated was
109. values store form fields and store query results Session variables that hold state between You can easily do online shopping pages applications using user variables Dozens of dynamic variables including date YobrowserAddress os Supports multiple domains on the same machine Provide access to predefined operating system routines that are normally difficult to access and use One WebBase server can support many domains For example one machine can host www yyyy com and www xxxx com each configured to present information differently WebBase can interrogate the capabilities of WebBase can dynamically decide to return the browser Password protection Custom context sensitive database logging for each search form Can customize response by user server IP address Welcome Mr Jones you ve visited our page times GIF or JPEG or FRAMES or tables or JAVA etc Keep your databases secure with user ID and password protection even down to security on a given field of a database Know who your customers are or who is visiting your site including keeping track of what they wanted Personalized pages generated on the fly by WebBase are displayed back to users browsers No CGI WebBase is the only database The WebBase server connects directly to the web server that skips external script database With CGI your server must WebBase User s Guide applications entirely launch a script e
110. variable or manually via the Edit menu Posting uses memory and processor resources so it might be desirable in a production system to disable posting Error messages will continue to be posted even though posting is marked as disabled The TCP IP reset will also be issued when appropriate regardless of the posting enabled status e Status gt Start heartbeat service This option is only active if the Stop heartbeat service option was previously selected It will cause a heartbeat to be sent out periodically the time interval is set by the Set heartbeat interval menu option or the variable heartbeatInterval and the replies reported e Status gt Stop heartbeat service This option is only active if the heartbeat function is currently active Note that the heartbeat function is only active when the WebBase Heartbeat Window is opened or if it has been stopped and then restarted using the Start Heartbeat Service available on this menu If the heartbeat service is stopped the background of the WebBase Heartbeat Window is changed to a blue gray color and no additional information is displayed until the heartbeat service is restarted The heartbeat parameters described below can only be changed when the heartbeat service has been stopped e Status gt Set heartbeat interval This option is only available when the heartbeat service has been stopped If this option is selected the Heartbeat Interval Dialog shown in Fig 5 23 is displayed Th
111. window Chapter 5 WebBase Windows 70 WebBase User s Guide pt 2 ODBC amp S QL ExperTolligence Chapter 6 This chapter provides information about Open Database Connectivity ODBC which is the standard used by WebBase for communicating with databases This chapter also covers some of the basics of Structured Query Language SQL that is used to create retrieve and delete records from a relational database 6 1 Open Database Connectivity Open Database Connectivity ODBC is a standard devised by Microsoft to enable any application to communicate with any database manager ODBC is based on Structured Query Language SQL as a standard for accessing data This interface provides maximum interoperability a single application can access different SQL Database Management Systems DBMS through a common set of code This enables a developer to build and distribute a client server application without targeting a specific DBMS Database drivers are then added to link the application to the user s choice of DBMS Most key database vendors now provide an ODBC interface via which the end user has access to centrally stored data directly from the database These interfaces are called ODBC drivers Microsoft provides a set of ODBC drivers for their products on their web site these drivers are also made available at the WebBase web site Instructions on acquiring and installing these ODBC drivers are included in Chapter 3 The sq macr
112. with some form of authorization e g Basic Authentication so that access to them is restricted to appropriate personnel Note Turning the cache off does not prevent someone else from hitting your site and accessing that database after you have turned the cache off they will simply create a connection to the database and release that connection as soon as they are done with it Timing is the issue here it is possible for someone to hit your site after you ve turned the cache off but before the database file modifications have been completed Protecting the database from access while caching is off can be done as described in the following section SQL Protect using Global Variables In order to do database administration it is necessary for the forms designer to give some thought to how best to protect the database yet still allow it to be modified One suggestion is to use a global variable that indicates whether the database is OK to use in a sql call If so then execute the sql statement If not output a message that the database is unavailable For example create a global variable called myDBAvailable and set it to true Then on each sql call implement it like WebBase User s Guide Fig 14 2 Example code to test database availability 14 3 if myDBAvailable errorProtect sql source INSERT SELECT statement sql onError Oops A database error occurred errorProtect else Sorry database is curr
113. you can get the Microsoft TCP IP system files via anonymous ftp to ftp microsoft com and change to the softlib mslfiles directory The file wfwtcp exe contains the updated Microsoft TCP IP protocol for use with Microsoft Windows for Workgroups version 3 11 The file tcp32b exe is a 32 bit TCP IP network protocol for Windows for Workgroups only WebBase User s Guide 11 Chapter 3 Installation 3 2 Installing WebBase The files for installing WebBase are provided on a CD or on line on the WebBase Web site at http www expertelligence com WebBase There are three sets of files provided as part of the installation 1 Files to install WebBase 2 Files to install ODBC drivers 3 WebBase documentation files WebBase Files on the CD The CD includes a single top level directory called WebBase The files and subdirectories within this directory on the CD are e WBSetup exe This file is used to install WebBase After it is executed all of the necessary program files are generated These files are described later in this section e readme txt This file describes the contents of this directory as well as providing some general installation instructions e docs This subdirectory contains documentation for both WebBase and WebberActive e docs webbase This subdirectory contains the documentation for WebBase The associated readme txt files describe each of the files in this directory as well as any subdirectories A copy o
114. you can use printHTMLTable in your form view the source from your browser and copy and paste the lt TR gt lt TH gt header row and one of the lt TR gt lt TD gt data rows to your htf form and then add the appropriate size border alignment etc formatting tags to achieve the desired results The WebBase Web Wizard database example 2 uses printHTMLTable e printPRETable e g sql to answers SELECT sql f answers printPRETable returns a string representing the receiver in tabular form using a lt PRE gt lt PRE gt block This only works on collections that contain OdbcRowObjects returned from an sql select WebBase User s Guide 199 Chapter 11 Expressions 200 Column headers are taken from the database table s column names as returned by the ODBC call Limited formatting is done to allow for the indicated field widths as specified in the database The WebBase WebWizard database example 2 uses printPRETable printTable e g sql to answers SELECT sql f printTable returns a string representing the receiver in tabular form using a lt TABLE gt construct block if the browser supports it or in a lt PRE gt construct if the browser does not support tables This only works on collections that contain OdbcRowObjects returned from an sql select See printHTMLTable and printPRETable for details on how the tables may be displayed printVHTMLTable e g sql to answers SELECT sql f answers
115. you follow the standard WebBase installation described in the preceding section After you have become familiar with the WebBase application and its components you may want to perform a custom installation in which only selected individual components are installed This section covers how to do a custom WebBase installation As in the standard WebBase installation it is recommended that you install WebBase into a WebBase directory at the top level on your system s hard drive Once the installation is complete make sure to install ODBC so that WebBase can communication with your database s WebBase User s Guide 21 Chapter 3 Installation To start the custom installation of WebBase double click on the WBSetup exe file When you get to the Installation Selection screen select the Custom Install button You will be prompted to enter the directory information for the Destination Directory WebWizard Directory and Backup Directory as described for the standard installation After the directory information is entered the dialog shown in Fig 3 13 is displayed Note that by default all components are selected for installation On Windows NT systems only there is an additional checkbox for Windows NT Service Support This option allows the utilities used to start and stop WebBase as a service to be installed Figure 3 13 Custom Installation Component Selection Dialog WebBase Components for Window
116. 0 0 26 Mar 1997 08 02 34 0800 none Pause_Server_ gt _active HTTP 1 0 27 0 0 1 26 Mar 1997 08 03 41 0800 GET wbwizard Wizard htf now 28700 HTTP 1 0 200 6136 27 0 0 1 26 Mar 1997 08 03 44 0800 GET wbwizard BasicEx now 29021 HTTP 1 0 200 491 27 0 0 1 26 Mar 1997 08 03 45 0800 GET wowizard basicex Wbexams htf now 29024 HTTP 1 0 200 7783 ZOO 26 Mar 1997 08 03 47 0800 GET wowizard basicex WBexaml HTF now 290250408useBACKbutton XX doUSEit HTTP 1 0 200 1033 27 0 0 26 Mar 1997 08 03 48 0800 GET wowizard basicex WBexams htf now 29027020 HTTP 1 0 200 7783 27 0 0 1 26 Mar 1997 08 03 50 0800 GET wowizard basicex WBexam2 HTF now 29028830 useBACKbutton XX doUSEit HTTP 1 0 200 1395 27 0 0 1 26 Mar 1997 08 03 52 0800 GET wowizard basicex WBexams htf now 29030430 HTTP 1 0 200 7783 0 0 0 0 26 Mar 1997 08 03 59 0800 none Pause_Server_ gt _paused HTTP 1 0 0 0 0 0 26 Mar 1997 08 04 00 0800 none Quitting HTTP 1 0 0 0 0 0 26 Mar 1997 08 04 00 0800 none Stop_Log HTTP 1 0 There are seven pieces of information displayed on each line remotehost the remote host IP number For general server entries e g Start_Log Quitting Stop_Log this value is entered as 0 0 0 0 rfc931 the remote logname of the user This information is not currently retrieved by WebBase so a dash is output authuser the username as which the user ha
117. 0 0 0 0 0 0 0 0 Pause Server gt paused Wed 26 Mar 1997 08 27 47 0 0 0 0 0 0 0 0 Quitting Wed 26 Mar 1997 08 27 47 0 0 0 0 0 0 0 0 Stop Log Extended Original WebBase EMWACS Log File Format is the same as Original WebBase EMWACS Log File Format with the addition of one item at the end of each line e lt bytes gt the content length of the document transferred in bytes or 0 if not available 12 2 Caching Caching is storing information into local memory so that if the information needs to be used in the future it will be readily accessible There are several variables of caching used by or affecting WebBase browser side caching of forms WebBase forms caching and WebBase ODBC Connection caching Browser Side Caching When a browser sends a URL to a server it caches the full URL and the results returned from the URL If the URL is requested again the browser simply displays the contents from the cache instead of making the request of the server again This works fine for static pages But the true power of WebBase is in being able to provide dynamic pages This section addresses how to circumvent browser side caching to always provide the latest information on a page to a user The first approach is to provide information to the browser about when the information in its cache is no longer valid This can be done by setting the expire variable which causes the Expires header parameter to be
118. 0 ms at the server Beeps the server at the frequency specified in the first argument for the duration specified in the second argument The duration is in milliseconds e cacheFreeForm e g f cMttpwbwizard default htf Yocmd cacheFreeForm gt false Removes the indicated form from the forms cache The argument must be the fully qualified form pathname not just the default htf portion as referenced via a URL This operation returns true if the form was found in the cache and removed false if not found in the cache e cacheFreeSource user e g f myAccess fref Yocmd cacheFreeSource user gt false Removes the specified ODBC connection from the cache This is similar to the cache keyword used on the sq macro described earlier A user can create a htf form for maintenance purposes that merely clears out specific cache entries whenever the form is run The first argument is the name of the ODBC source the second is the username If no username was assigned by the ODBC administrator an empty string must be specified for the second argument e cacheMenultemCheck e g f cmd cacheMenultemCheck gt a HttpGetN Force the menu items under the WebBase WebServer Option s menu to agree with the current state of caching This should be used if the user is modifying the value of cacheOdbc within a form to ensure that subsequent interactions with the WebBase WebServer window accurate reflect the status of ODBC conn
119. 1 start 8 2 The WebBase Macros text The brace macro generates a string enclosed in curly braces This is useful when dynamically generating other htf forms to be processed by WebBase While the same functionality can be achieved using the set or setString macro and the leftBrace and rightBrace variables the brace macro makes code much easier to read The tilde character is used to identify the macro so that brace is not considered a reserved word This reduces the potential for conflicts when adding this macro to existing forms The example below generates a string set foo bar Y Example 8 1 Brace macro example set foo bar call lt path gt lt args gt call The call macro essentially calls a subroutine It starts up a new command as if the user addressed a different URL but more than likely this subroutine would not be referenced directly by a user via a URL as it would not be run independently In principal it is similar to the insert macro in that it allows code reuse but in implementation it is quite different The insert macro actually inserts the source inline the internal structures that are built to represent the macros etc The call macro actually creates a new command runs it and if requested returns information from it to the calling form The path is required and specifies the name of the command or file to execute See the insert macro below for the format of spe
120. 222 The value contained within a DateTime field in an ODBC database is returned to WebBase as an OdbcTimeStamp It is made up of 3 components the date the time and a fraction The date time value is displayed as 07 11 96 02 37 38 PM 0 The date is displayed first followed by the time The 0 at the end is the fraction and is either a 0 or a 1 The following operations can be sent to any instance of an OdbcTimeStamp returned as the value in a DateTime field in a database For the examples below the variable otsVar1 will contain the OdbcTimeStamp representing the date and time 03 11 97 02 37 38 PM 0 The variable ots Var2 will contain the OdbcTimeStamp representing the date and time 03 12 97 11 23 35 AM O lt e g f otsVarl otsVar2 lt gt false returns true if the receiver is less than the argument otherwise false lt e g f otsVarl otsVarl lt gt false returns true if the receiver is less than or equal to the argument otherwise false e g f otsVarl otsVar2 gt false returns true if the receiver and argument are the same date and time otherwise false gt e g f otsVarl otsVar2 gt gt true returns true if the receiver is greater than the argument otherwise false gt e g f otsVar2 otsVar2 gt gt true returns true if the receiver is greater than or equal to the argument otherwise false asDateTime e g f otsVarl asDateTime 03 11 97 02 37 38 PM returns a string
121. 23 Web Browser See Browser Web document See Web page Web page 7 Web server See HTTP server WebAlias ini 303 WebBase Data Types Arrays 186 Associations 203 Booleans 209 Characters 207 Collections 182 Databaselnfo 248 Dates 210 Dictionaries 204 Directories 228 Envelopes 296 File Streams 235 Files 225 Floats 178 Fractions 179 HttpCommand 244 Integers 176 Mail Lists 295 ODBCRowHeaders 239 ODBCRowObjects 235 OdbcTimeStamp 223 Ordered Collections 198 Ordered Lists 202 Points 179 Read Streams 233 Read Write Streams 235 WebBase User s Guide Registration Database 240 Sorted Collections 202 Sorted Lists 203 Streams 230 Strings 186 Symbols 198 Times 216 Universal Times 218 Write Streams 234 WebBase Heartbeat Window 65 WebBase macro forms See htf Files WebBase Mail Service Window 284 WebBase output forms See htf Files WebBase Parameters 58 WebBase Server 10 WebBase Server Window 49 290 WebBase Total View Window 62 WebBase Transactions Service Window 58 WebBase WebWizard 13 22 Basic Examples 94 162 Data Sources 116 Database Examples 108 282 Java Examples 81 Registration Database 35 38 41 42 44 125 Sample Sites 126 starting 47 WebBase bat 13 WebBase bmp 13 WebBase exe 13 WebBase ico 13 WebBase ini 302 WebBaselD 123 160 WebberActive 79 WebExtens ini 303 WebVars ini 304 WHERE clause
122. 327 printFraction decimalSeparator gt 0 524 returns a string representing the receiver in which it has been truncated and rounded to the number of decimal places specified by the first argument and the second argument a string is used as the decimal separator printRounded e g f 3 0 52399327 printRounded gt 0 524 returns a string representing the receiver in which it has been rounded to the number of decimal places specified by the first argument printWholeDollars e g f 29 95 printWholeDollars 30 returns a string representing the receiver as a dollar value If necessary the receiver is rounded quo e g f 3 2 17 6 quo gt 5 returns the integer quotient generated by dividing the receiver by the argument the result is truncated toward zero radiansToDegrees e g f 3 14159265 radiansToDegrees gt 180 0 return a number representing the receiver converted from radians to degrees raisedTo e g f 3 5 raisedTo gt 125 0 returns a float representing the receiver raised to the power specified by the argument raisedToInteger e g f 3 5 raisedTolnteger 125 returns a number representing the receiver raised to the power specified by the argument This differs from raisedTo in that the argument must be an integer reciprocal e g f 4 0 reciprocal gt 0 25 returns a number representing 1 divided by the receiver rem e g f 6 17 rem gt 5 returns the integer remainder genera
123. 5 values on the stack areremoved Note that the arguments between are on the stack in the reverse of how they are used in the operation the second argument is highest in the stack and removed first the first argument is lower in the stack and removed second 20 The operation is performed and the result in this case true is returned as the value of the expression Building Compound Statements in RPN After reviewing the examples of RPN usage shown above RPN can still be difficult to use especially when attempting to build compound statements When attempting to build a compound if statement in RPN we recommend WebBase User s Guide 167 Chapter 11 Expressions 1 Set the values of each of the individual components of the compound if as a unique WebBase variable using the set statement 2 Combine the results using the required and or logical Again do it one at a time setting the result to another local WebBase variable 3 Test the resultant variable within the compound if 4 Once you get the above working cut the expression from one set statement and paste it into the following statement where that variable name was used Continue back up the sequence of set statements etc until you ve eliminated the need for the local variables For example how would a user go about building a statement to do something IF varl is greater than 5 and the string str1 contains the substring abc or variable var2
124. 7 WHERE variable will be put together with AND or OR operators The WHERE dynamic variable uses the value of YwhereMultiAndOr to indicate the logical operator to use when collecting multiple valued values e g a collection of checkboxes all given the same variable name By default whereMultiAndOr returns the string OR If you want to replace the OR operators with AND operators the following will create a local variable to override this variable to return the AND string set SwhereMultiAndOrS AND e 9 whileCounter e g 1 used by the while macro it is automatically set to the loop count x e g 123 the x coordinate sent when the user clicks over an ISMAP image returns 0 if referenced outside the context of an ISMAP reference e y e g 132 the y coordinate sent when the user clicks over an ISMAP image returns 0 if referenced outside the context of an ISMAP reference Operational Variables A global user or local variable can override any of the above WebBase dynamic variables The following dynamic variables can be modified by accessing the Options menu on the WebBase Server window However the changes made by selecting these menu options are only valid for the current session When WebBase is stopped and restarted the default values will be restored If you want to permanently change the values of any of these variables it is recommended that you add global variables with the desired values fo
125. 71 notNull 171 312 now 218 223 numerator 174 numerator denominator 179 numeric fields 74 109 nums 185 O Object 10 occurrencesOf 185 206 ODBC 7 71 322 ODEC connection cache 53 56 148 270 ODBC Connection Cache 51 258 ODBC Drivers 28 269 272 ODBC Sources 28 odbcDataSources 249 odbcDataSourcesRaw 249 odbcDataSourcesSQL 249 odbcDrivers 249 odbcDriversSQL 249 odbcDriversSQL2 250 OdbcRowObjects 198 odd 174 on 233 onlyDigits 194 Open DataBase Connectivity See ODBC Open Location Menu Option 63 Open Transactions Window Menu Option 54 open in 227 Operations 165 OR operation 170 ORDER BY clause 73 Original WebBase EMWACS Log File Format 36 254 output macro 96 P padchr parameter 156 parallel macro 97 Parameters 35 305 parseAt 194 parseAt into 194 parseAtAny 194 parseAtAny into 194 passEncode 194 pathName 226 229 235 pathName 227 230 pathName in 227 pathnameDOS 194 pathNameReadOnly 227 pathNameReadOnly in 227 pathnameUNIX 194 pathToday 216 Pause Server Menu Option 50 peek 232 peekFor 232 pi 179 PortNo parameter 18 35 position 232 position 232 positive 174 POST 6 57 64 80 97 115 124 244 245 259 Posting enabled Menu Option 60 67 286 Pragma 309 prefix parameter 156 previousWeekday 212 print macro 311 printCo
126. 800 GET HTF now 287050508useBACKbutton XX doUSEit HTTP 1 0 200 1032 basicex Wbexams htf now 28704 Mozilla 3 0 Win95 I 07 58 29 0800 GET htf now 28707790 HTTP 1 0 200 7782 basicex WBexaml HTF now 28705050 useBACKbutton XX doUSEit 07 58 31 0800 GET HTF now 287097208useBACKbutton XX doUSEit HTTP 1 0 200 1394 basicex WBexams htf now 28707790 Mozilla 3 0 Win95 I 07 58 41 0800 GET htf now 28711690 HTTP 1 0 200 7783 basicex WBexam2 HTF now 28709720 useBACKbutton XX doUSEit 07 58 52 0800 none Pause_Server_ gt _paused HTTP 1 0 07 58 54 0800 none Quitting HTTP 1 0 07 58 54 0800 none Stop_Log HTTP 1 0 Baths PEA Extended Common Log File Format is the same as Common Log File Format with the addition of two items at the end of each line refer the referer to this page Referer or user agent the browser requesting this page User Agent or 66 66 if none 66 66 if not available Extended Combined Log File Format LogFormat 4 The Extended Combined Log File Format is also acceptable to many of the commonly available Web analysis tools The text file containing the output in Extended Combined Log File 252 Format is shown below WebBase User s Guide Example 12 3 Extended Combined Log File Format 0 0 0 0 26 Mar 1997 08 14 14 0800 none Start_Log HTTP 1 0 0 0 0 0 26 Mar 1997 08 14 15 0800 none Pause_Server_ gt _paused HTTP 1
127. 8100 HTTP 1 0 200 7783 http 127 0 0 1 wbwizard basicex WBexam2 HTF now 296963408useBACKbutton XX doUSEit Mozilla 3 0 Win95 1 0 0 0 0 26 Mar 1997 08 15 05 0800 none Pause_Server_ gt _paused HTTP 1 0 0 0 0 0 26 Mar 1997 08 15 06 0800 none Quitting HTTP 1 0 uu 0 0 0 0 26 Mar71997 08 15 06 0800 none Stop Log HTTP 1 0 Mm nn Extended Combined Log File Format is the same as Extended Common Log File Format except that the rfc931 entry has been replaced with the server address e serverAddress the server s IP address This can be useful if multiple domains are being used as the log records applicable to a particular domain can be identified Original WebBase EMWACS Log File Format LogFormat 0 The Original WebBase EMWACS Log File Format was derived from the EMWACS HTTP Server This format is not compatible with many of the Web analysis tools This format is provided for compatibility with previous releases of WebBase 1t may not be supported in future releases It is strongly recommended that the Common Log File Format Extended Common Log File Format or Extended Combined Log File Format be used The text file containing the output in Original WebBase EMWACS Log File Format is shown below WebBase User s Guide 253 Chapter 12 Features Example 12 4 Original WebBase EMWACS Log File Format We
128. 9 Stream Class Operations iio 232 11 27 Read Streams an aa pela aes 232 Read Stream Instance Operations scceeeeesscecsscecsseeeesseessscecsceceseeeesaeecsaeecsseecssaesesaeecsaeesseeesseeensaes 232 Read Stream Class Operations cceeseccsssecesscecsncecsseecesseecsscecscecsseeeesseecsaeecseecsseecesseeesaeesseeesneeeesaes 232 11 28 Write A cout ese tees ae Ee wen LOU a aah sad ote tabet ents abe wetered ARA ose A ante Esana Sn 232 Write Stream Instance Operations idilio 232 Write Stream Class Operation tilda 233 Table of Contents 11 29 AS US NN 233 Read Write Stream Instance Operations cceeseseseeesseeecesseceseeesaeecsacecseeessaeeecsseeseeessaeeceneeeesaeessaeers 233 Read Writ Stream Class Operations s s scc c ievhnsacasesdnebivecns dnasensedaghevandaneadeseousbosodeadensedschsviptassouaas 233 1130 File Sthe aims enn iat soa A A dao 234 113k OdDCROWOD SCIS oreneko n pia dle lente epuncussteyaaetindauteatedotesuatpnestaes soe datediey tet cre ds 234 11 32 OdbeRowHeadetsiicc 5 chin tdi os iia 238 11 33 Registration Database ont ida ela 239 Registration Database Instance Operations oooonocccnonccnonccoonanonnnonnonacnonaconnanononncnnnnc none nonnn nono nncnnnccnncccnnnss 239 Registration Database Class Operations ssccseseccssceceeececececsseeceseeeesaeecsaeecsseecsseesesaeecsaeessaeessneeeesae 241 11 34 HtpCommand ia id 242 1135 Database AAA eves Ea Ea ANNE aer aaan sung ESO
129. Any parameters specific to this domain are entered within this key Any extensions or aliases for this domain are entered in subkeys called Extensions and Aliases respectively Chapter 4 provides details on the parameters that can be specified for each domain as well as how to define extensions and aliases for multiple parameters Existing multiple domain parameters extensions or aliases may be edited or deleted Any changes to multiple domains will not take effect until WebBase is stopped and restarted Global Variables 1 If no aliases have been defined create Variables as a New Key Note that the key must be entered exactly as indicated 19 A did eae Ease A The Parameters entry will exist if the user selected to store the WebBase parameters entered during installation into the System Registry default If thi skey does not exist create it as a New Key Note that the spelling and case must be exact 304 WebBase User s Guide 2 Select the Variables entry Create any new global variables as String or Dword Values with the appropriate key global variable name and value Existing global variables may be edited or deleted Unlike with WebBase parameters extensions aliases and multiple domains it is possible to update a running WebBase application with global variable modifications From the WebBase WebServer window select the Load Global Variables option WebBase User s Guide 305 Appendix C Heade
130. BC driver for that particular database With many databases the ODBC database driver returns the field names exactly as specified by the user when doing the record definition For example the user specifies Last Name in the database development interface and the ODBC database driver returns Last Name However some ODBC database drivers return the field names in other forms e g LAST NAME To determine how your specific ODBC driver returns the field names it is recommended that you use the Data Sources tool available from the WebBase Web Wizard window Select the Data Sources anchor and then select to view your available data sources This will present a table of all the data sources you currently have defined on your system as well as the driver associated with them Select the desired source A list of the tables within this database is displayed along with information such as the path specification for the database file Select the desired table and a table showing all the fields in the table is displayed The first column in this table lists all the fields within the database The field names within this column can be used as field variables within WebBase forms Again be very sure on the spelling and case of each field variable name because all variable names are case sensitive When a database query is issued and data is returned fields within the returned record are accessed using the field name as a variable
131. CR and line feeds CR in it returns a new string containing the receiver after all carriage returns have been removed and all linefeeds have been replaced with the string identified in the argument e replaceString with e g f Il LL hello replaceString with gt heLLo returns a copy of the receiver with the string specified in the first argument replaced by the string specified in the second argument e sortAscendingAt e g f George Bev Robert sortAscendingAt gt Bev George Robert returns a new string of items that have been sorted The receiver is a set of substrings that are separated by the parsing character specified as the input argument The receiver is converted into a sorted list using ascending order and then converted back into a string See also parseAt and concatWith e sortDescendingAt e g f George Bev Robert sortDescendingAt gt Robert George Bev returns a new string of items that have been sorted The receiver is a set of substrings that are separated by the parsing character specified as the input argument The receiver is converted into a sorted list using descending order and then converted back into a string See also parseAt and concatWith WebBase User s Guide 195 Chapter 11 Expressions e gt stripQuotes e g f string in dbl quotes stripQuotes string in dbl quotes 1f the receiver is enclosed in double quotes returns a
132. D integer value Each parameter name is spelling and case sensitive so be sure to enter them exactly as described in Chapter 4 The value of any parameter can also be modified Parameters can also be deleted but care should be taken before deleting a parameter as it may affect the ability of WebBase to be restarted Extensions 1 If no extensions have been defined create Extensions as a New Key Note that the key must be entered exactly as indicated 2 Select the Extensions entry Create any new extensions as String Values with the appropriate key extension type and value mime type Existing extensions may be edited or deleted Any changes to extensions will not take effect until WebBase is stopped and restarted Aliases 1 If no aliases have been defined create Aliases as a New Key Note that the key must be entered exactly as indicated 2 Select the Aliases entry Create any new extensions as String Values with the appropriate key alias name and value pathname Existing aliases may be edited or deleted Any changes to aliases will not take effect until WebBase is stopped and restarted Multiple Domains 1 If no domains have been defined create Domains as a New Key Note that the key must be entered exactly as indicated 2 Select the Domains entry Create a New Key for each desired domain address This key must be the IP address of the domain e g 1 2 3 4 3 Select the new IP address subkey
133. D NEQN 123 gt ID 123 same as NEQ but coerces the value to a number using asNumber e NEQS e g ID NEQS 123 gt ID 123 same as NEQ but coerces the value to a string using asString and encloses the field in single quotes e NLT e g ID NLT 123 gt ID lt 123 adds the field to the WHERE clause using a not less than operator e NLTN e g ID NLTN 123 gt ID lt 123 same as NLT but coerces the value to a number using asNumber e NLTS e g ID NLTS 123 gt ID lt 123 same as NLT but coerces the value to a string using asString and encloses the field in single quotes e NGT e g ID NGT 123 gt ID gt 123 adds the field to the WHERE clause using a not greater than operator e NGTN e g ID NGTN 123 gt ID gt 123 same as NGT but coerces the value to a number using asNumber e NGTS e g ID NGTS 123 gt ID gt 123 same as NGT but coerces the value to a string using asString and encloses the field in single quotes e XX e g code XX sample gt skips this field name when constructing the WHERE clause 12 4 ISMAP Features 260 WebBase can handle ISMAP images but does not make use of a MAP file The HREF specified in the anchor surrounding the ISMAP image is not a MAP file but simply another htf file This file can access the variables x and y to determine the x and y coordinates returned when the user clicked over the ISMAP image Using the if else f or case m
134. DBC cache it is highly likely that the GPF will occur as soon as a WebBase htf form that accesses an Access database is processed The solution to the above problem is in allocating the first connection handle then closing the connection and not freeing the handle This is deliberately creating a small memory leak by leaving the handle s memory allocated This not only prevents the GPF from occurring on this first handle allocation but makes this area of memory unavailable for reuse in subsequent ODBC calls and thus prevents the GPF from occurring on any of these calls The problem seems to be very specifically related to the first and only the first allocated ODBC connection handle For users of the WebBase server this means that one must 1 have a way of specifying that the connection handle associated with an sq macro call NOT be freed after use 2 have a way of ensuring such an sq macro call will be made before any other sq macro call to an Access database can occur In other words there must be a way to ensure this is the first allocated connection handle that is being marked for NOT being released Item 1 is accomplished through the use of the new keepHandle keyword on the sq macro The only purpose of this keyword is to support this workaround It is anticipated that once Microsoft corrects this problem and a new ODBC driver pack is available that this keyword and workaround will be eliminated By default the value of the keepHandl
135. DLL files reside Application required the full pathname of where the WebBase exe file will be found when setting up WebBase to run as a service Editing WebBase Parameters Adding new parameters or changing existing parameters is done using the WebBase WebWizard Registration Database utility If WebBase will not start due to an incorrect parameter and it is not possible to use the WebBase WebWizard or if a parameter is to be deleted see Appendix B for details on how to directly edit the System Registry This appendix also includes information on setting up the INI files used on 16 bit systems To edit WebBase parameters 1 Start WebBase and open up the WebBase WebWizard by entering the URL http 127 0 0 1 lt port gt wbwizard The lt port gt is the PortNo parameter If port 80 is used the lt port gt portion of the above URL can be dropped Select the Registration Database anchor From the pull down list select HKEY_LOCAL_ MACHINE and then press the OPEN button Select the Open anchor next to the SOFTWARE key Select the Open anchor next to the ExperTelligence Inc key Select the Open anchor next to the WebBase key Select the Open anchor next to the version number e g 4 10 Select the Open anchor next to the Parameters key All of the WebBase parameters currently defined and their values are displayed in the table e The
136. E WebbBase Usade comio Attias 77 DELETE aee oo 77 DELETE General Usage iynin naaa eE Ea a EE E EA A AAE aTi 77 DELETE WebBase Usd nico das 77 iv WebBase User s Guide Chapter 7 htf Files 79 TL Editins Wtf Biles 0 dd dd dios 79 1 2 Requesting Input ona Forista tidad midi 80 7 3 Processing Input from a Form ion eE e ie atte 81 Chapter 8 Macros 83 8 1 Overview of WebBase Macros cccesssseeeessceecessseeeeesneeeeceeaneeeceeaeeeeenneeeceeeeeeeseeeeceeeaeeeesenneeeeneneeeens 83 8 2 ThE WebBase Macros aeree condal lea dd dd ai lides 84 O O trea E sdeceasaes 84 call lt paths lt arg a 84 case lt exp gt match lt mArg gt otherwise CaSC eeecccccesecccceesneeeceeeneeeceeneeeeeseaeeeesenaeeeesenneeeseees 88 comment comment lacoste illa caos alain dos io eo dele coe bauvetga Sues ana 89 ensure oOnEXI EOS sde 89 errorProtect onError errorProtect ooooococnnnonccnnnnoncccnonnnnononnncnnnnonnnonnnnn cnn nono cnn non nro nnnnnn nn nnnnnnnnnnnnns 90 escape label asas dales 90 E A O RE EAS 91 O A O RR 92 O reacties NN RT AT 92 forIndex lt indexCtr gt lt args gt forlndex oooooooccnnocccnnonocccnononcnonononcncnnnnnnonnnnnnnornnnnnnrnnnnn non nnnnn nn ron nnnnnnnnns 92 forRow lt currentRow gt lt optionalArgs gt fOrROW ccsesscccessceceeeneeeceesneeceeseeceeesaeeeceseaeeeseeneeeeseeae 93 nth EEE ecaveveees Ans E E E cova tehedvaneeas aunties snavane tus swunes ss dvca
137. E 15 VALUE Zip Code lt INPUT TYPE TEXT NAME zip SIZE 15 VALUE gt lt INPUT TYPE SUBMIT NAME button VALUE Make Record gt lt INPUT TYPE SUBMIT NAME button VALUE Cancel gt lt INPUT TYPE HIDDEN NAME id VALUE 12345 gt lt FORM gt The command line generated when the user presses the Make Record button would look like form2 htf name mytname address 123 Main St amp city Santat Barbara amp state CA amp zip 93101 amp id 12345 amp button Make Record The values typed in by the user would be passed along with each variable name on the command line The characters in the command line are automatically added to represent spaces they are automatically removed by WebBase when the command line is received and parsed The browser also encodes other special characters such as in the formation of the URL sent to the server WebBase automatically decodes these characters also When the WebBase server receives this command it parses all the argument and value pairs into local variables and values In this case the local variables would be name my name address 123 Main St city Santa Barbara state CA zip 93101 id 12345 button Make Record WebBase stores th
138. EF file2 htf id id amp name nam ncode true Page 2 lt A gt In this example there are two WebBase variables that are going to be passed from the current form into file2 htf The name variable is a text field and may include spaces or other punctuation characters that need to be specially encoded as part of the HTML command line The encode true parameter indicates that the variable is a string that should be encoded After WebBase processes this URL and sets up the anchor it will look like lt A HREF file2 htf id 12345 name mytname Page 2 lt A gt The final way to create command line arguments is using the redirect2 macro Unlike the redirect macro that simply points to a new URL the redirect2 macro can be used to pass command line arguments to the specified file The following shows how the id and name variables can be passed via a redirect2 macro redirect2 file2 htf id id name name redirect2 Unlike with anchors it is not necessary to indicate that the name variable is a text field and needs to be encoded The redirect2 macro will automatically handle this and generate a URL that looks like http file2 htf id 12345 amp name my name Local variables created from command line arguments are indistinguishable from other local variables that may have been created by the set or setLocal macro or may have been read in as header and cookie variables Because of the vari
139. ELECT via ODBC The collection may be empty if no matching data records were found or may contain a number of ODBC row objects the results of the SELECT Several of the operations described below can only be applied to ordered collections containing OdbcRowObjects The collection used in these examples is cltn1 generated using set cltnl one two three parseAt asOrderedCollection The asOrderedCollection operation is used to convert the ordered list generated by parsing into an ordered collection All of the displayed behavior would work for ordered lists also e add e g f end cltnI add gt end cltnl gt OrderedCollection one two three end returns the argument after adding it to the end of the receiver e add after e g f end two cltnl add after cltn1 gt OrderedCollection one two end three returns the first argument after adding it to the receiver immediately after the element in the second argument e add afterIndex e g f end 2 cltnl add afterIndex cltnl gt OrderedCollection one two end three returns the first argument after adding it to the receiver at the index position immediately after the second argument e add before e g f end two cltnl add before cltn1 gt OrderedCollection one end two three returns the first argument after adding it to the receiver immediately before the element in the second argument e a
140. ERE 146 259 JowhereAndOr 147 315 Index JowhereMultiAndOr JowhileCounter JowhileLimit 111 154 WriteStream x 147 261 y 147 261 amp 170 209 172 d 170 182 207 LIKE 260 LIKE 260 EQ 259 EQN 259 EQS 259 GE 260 GEN 260 GES 260 GT 260 GTN 260 GTS 260 LE 260 LEN 260 LES 260 LIKE 260 LIKE 260 LT 260 LTN 260 LTS 261 NEQ 261 NEON 261 NEQS 261 NGT 261 NGTN 261 NGTS 261 NLT 261 NLTN 261 NLTS 261 XX 261 172 180 316 172 180 172 180 170 209 172 180 207 lt lt 172 180 187 203 207 210 216 218 223 lt 172 180 187 203 208 210 216 218 223 lt FORM gt 80 118 lt INPUT gt 80 118 lt SELECT gt 80 153 lt TEXTAREA gt 80 172 180 182 203 208 210 216 218 223 228 gt 172 180 187 204 208 210 216 218 224 gt 172 180 187 204 208 210 216 218 224 4 404 File Not Found 39 41 5 503 The Server is Too Busy 50 A abs 172 180 Accept 64 307 Accept Charset 307 Accept Encoding 307 Accept Language 308 add 198 205 241 add after 198 add afterIndex 198 WebBase User s Guide add before 198 add beforeIndex 198 addAll 199 205 addAllFirst 199 addAllLast 199 addDays 210 219 addDictionary 205 addFirst 199 addLast
141. From to e g f 1 2 cltnl copyFrom to one two f 1 2 strl copyFrom to gt ab returns a new collection containing the elements between the starting index first argument and ending index second argument copyReplaceFrom to with e g set newCltn eight nine parseAt f 1 2 newCltn cltn1 copyReplaceFrom to with eight nine three f 1 2 st strl copyReplaceFrom to with stc returns a new collection containing all the elements in the receiver with entries indexed from start first argument through stop second argument being replaced by the elements in the collection third argument Note that the replacement collection may be less than or greater than the number of elements to be replaced copy With e g f four cltnl copyWith one two three four f d strl copyWith gt abcd returns a new collection containing a copy of the receiver with the element in the argument added to the collection copy Without e g f one cltnl copyWithout two three f c strl copyWithout gt ab returns a new collection containing a copy of the receiver with the first element that exactly WebBase User s Guide matches the argument omitted If there is no element in the receiver that matches the argument a copy of the receiver is returned e first e g f clinl first gt one f strl first g
142. HAR BMW Model 15 VARCHAR 31815 Cylinders 9 TINYINT 4 Transmission 12 VARCHAR 5 Speed Kind 15 VARCHAR 2 Door Color 15 VARCHAR Red Mileage 11 INTEGER 3000 Price 22 DOUBLE 22900 0 UE Ar S BIT true Cruise 6 BIT false Category 15 VARCHAR Passenger Country 10 VARCHAR European e describeVHTMLTable e g sql to answers SELECT sql f Cars Database answers describeVHTMLTable returns a string that displays a lt TABLE gt for each entry in the collection The table shows the field name field size field type and value within the field This is the same as the describeVHTMLTable operation described above except that the title of the table can also be specified e printHTMLTable e g sql to answers SELECT sql f answers printHTMLTable returns a string representing the receiver in tabular form using a lt TABLE gt lt TABLE gt block This only works on collections that contain OdbcRowObjects returned from an sql select Column headers are taken from the database table s column names as returned by the ODBC call Limited formatting is done to allow for the indicated field widths as specified in the database This operation does not include any way to specify sizes in any of the lt TH gt or lt TD gt generated If you need to perform more details formatting like size you will need to write a forRow loop and do the lt TABLE gt lt TABLE gt manually As a starting point
143. However before you can access a database you will have to install ODBC drivers It is recommended that you follow this installation procedure even if you already have ODBC drivers installed to ensure that the latest versions of all necessary ODBC files are available ODBC Drivers The ODBC drivers are used by WebBase to communicate with a database application so that database information can be retrieved updated or deleted using WebBase forms The WebBase User s Guide 27 Chapter 3 Installation WebBase CD and WebBase Web site both provide access to ODBC driver packs that include drivers for the Microsoft database applications e g Access SQL Server There are many databases other than the Microsoft databases that also have ODBC drivers These drivers are generally available from the database vendor or another third party company The ODBC driver packs are operating system dependent not database application version dependent While it is generally possible to run the latest version of a database on an older operating system e g Access 97 on NT 3 51 it is not possible to use the latest ODBC drivers on an older operating system ODBC database drivers may be installed onto your system as part of a database installation If you are running a newer database version with an older operating system version it is critical that you re install the ODBC drivers for your operating system version after the database installation The ODBC driv
144. IP communications configuration in place is to install a copy of a browser such as Netscape or MSIE You will need some form of Web browser to test your WebBase applications and WebBase requires the same communications support as does a Netscape or MSIE browser Being able to install and use a browser can help eliminate some possible problems with installing WebBase WebBase User s Guide Start the WebBase application using the icon created during installation or using the Start gt Program gt WebBase option A WebBase splash screen is initially displayed If any of the WebBase required parameters were not entered during installation then WebBase will shut down The PortNo Directory and License parameters must be entered either during installation or directly into the System Registry prior to being able to run WebBase If WebBase is started successfully two windows will be displayed The first window is titled Late breaking news from ExperTelligence The second window that is displayed is the WebBase Server window Both windows are described in detail in Chapter 5 If the second window is empty or does not open review the information in the following section on installation problems If the window does open your WebBase application is up and running You should continue to verify that the WebBase installation is correct by following the instructions in the section below on testing communications Error messages may also be
145. LeftInMonth e g f dateTime daysLeftinMonth 12 returns an integer specifying how many days remain in the month This is equivalent to f dateTime date daysLeftInMonth daysLeftInYear e g f dateTime daysLeftInYear 288 returns an integer specifying how many days remain in the year This is equivalent to f dateTime date daysLeftIn Year elapsedDaysSince e g set datel 25 date subtractDays set dtl datel asString JodateTime dateFromString f dtl dateTime elapsedDaysSince gt 25 returns an integer specifying the number of days between the receiver and the argument Only the date portion of the receiver and argument are used both receiver and argument must be UniversalTimes elapsedMonthsSince e g set datel 25 date subtractDays set dtl datel asString YodateTime dateFromString f dtl YdateTime elapsedMonthsSince gt 1 returns an integer specifying the number of months between the receiver and the argument Only the date portion of the receiver and argument are used both receiver and argument must be Universal Times firstDayInMonth e g f dateTime firstDaymMonth 60 returns an integer specifying the number of the first day in the month from the beginning of the year This is equivalent to f dateTime date firstDayInMonth firstDayOfMonth e g f dateTime firstDayOfMonth gt 03 01 97 returns a new date representing the first of the month This is equivalent to f da
146. ME myWhere VALUE htf category category AND misc LIKE S misc sql true AND work LIKE S work AND age GES age htf gt lt INPUT TYPE SUBMIT VALUE SUBMIT gt lt FORM gt lt PRE gt The Atf macro surrounding the information in the VALUE field above quotes the contents so that WebBase does not PROCESS the fields contained within curly braces e g category misc sql true at this time Instead the myWhere hidden variable is passed to Wbact9 htf where WebBase will then process it 94 WebBase User s Guide WebBase User s Guide 95 The Wbact9 htf form called when you submit the above example uses the myWhere variable as follows Example 8 19 htf Macro form 2 sql to answers source myData user me password secret SELECT FROM myTable WHERE f myWhere cmd asHTF sql The f myWhere cmd asHTF expression parses the contents of the myWhere variable first removing any surrounding htf htf macros and then evaluating the variable referenced contained within the string The Atf macro would not be necessary if the input form was being handled by a non WebBase server since a non WebBase server will not attempt to process anything within curly braces If WebBase is used to handle the input form the htf macro is simply a signal to WebBase to not process everything within the macro The htf macro was designed so that when used
147. MENTATION even if advised of the possibility of such damages In particular ExperTelligence shall have no liability for any programs or data stored in or used with ExperTelligence products including the costs of recovering such programs or data THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS ORAL OR WRITTEN EXPRESS OR IMPLIED No ExperTelligence dealer agent or employee is authorized to make any modification extension or addition to this warranty Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages so the above limitation or exclusion may not apply to you This warranty gives you specific legal rights and you may also have other rights which vary from state to state Copyright This manual and the software described in it are copyrighted with all rights reserved Under the copyright laws this manual or the software may not be copied in whole or part without written consent of ExperTelligence except in the normal use of the software or to make a backup copy The same proprietary and copyright notices must be affixed to any permitted copies as were affixed to the original This exception does not allow copies to be made for others whether or not sold but all of the material purchased with all backup copies may be sold given or loaned to another person Under the law copying includes translating into another language or format
148. Mozilla 3 0 Win95 I Returns the string that identifies the browser variableExists e g f myVar cmd variableExists true Returns true or false if a variable by the specified name exists The variable precedence order is used to determine if the variable exists e g field gt local gt user gt global gt dynamic vars e g f cmd vars gt Dictionary arg1 gt abc CookieCounter gt 5 PocookieDomain gt cmd gt a HttpGetN resultLimit gt 0 accepts gt OrderedCollection image gif image x xbitmap image jpeg image pjpeg YresultOffset gt 1 User Agent gt Mozilla 3 0 Win95 T resultCount gt 0 cookiePath gt repeatCount gt 1 Cookie gt WebBaseID W14696994E 1618083 18465B CookieCounter 5 resultStart gt 1 Connection gt Keep Alive Host gt 127 0 0 1 WWebBaselD gt W14696994E 1618083 18465B JotheArgs gt OrderedList argl arg2 IobrowserAddress gt 127 0 0 1 arg2 gt 1 cookieExpires gt Accept gt image gif image x xbitmap image jpeg image pjpeg Returns the local variables dictionary 11 35 Databaselnfo DatabaselInfo is a global variable that allows access to the Databaselnfo class that provides information about ODBC sources No instance operations are provided as it is not possible to c
149. N a tea secestnnede dete aE EENEN 247 Chapter 12 Features 250 TE A A E E A 250 Common Log File Format LogFormat 3 ccscccccsssscceeseneeeceeeneeeeesaeeeeeseaeeeeeseaeeeeesnneeeeseneeeeeneaeeeess 251 Extended Common Log File Format LogFormat 2 ooocccnncccnonncnonncnonanonnanononncnonccnonanonnnnonnccnanccnancninnnss 252 Extended Combined Log File Format LogFormat 4 oocccnocccnonccnonncnonnncnnnnonnnnononncnonancnnanononncnnnccroncncnnss 252 Original WebBase EMWACS Log File Format LogFormat 0 ooococnnooccccnnonccnononnnnnnnonnnnnnnnnnnnnnnnnnnnnnno 253 Extended Original WebBase EMWACS Log File Format LogFormat 1 oooonnnocccnnnoocccnoooncncnonnnnnnnno 254 LADA A oe cat Sees toasts A E E ad nado El 255 BrowserSide Cachi iia linen lacio Man keaehaala Meena esta nido 255 Forms Cachi citaciones 256 ODBC Connection Cachi titi 257 12 3 WHERE Clause amp Variable Name Suffixes ooooocoocnnoncccnnonncnnonnnnnonnnnncnononnnnononnn nro nnnnn nn cnn n nn rra nena ninnnnnos 258 124 IS MAP RE atures add Aa acid salen ion 260 Chapter 13 Security 262 13 1 Basie Authentication ntc tias 262 13 2 Directory Browsing ssns n e oe edl ne ingen ain a ine ai ie alee 265 13 S HITS Walls la oi ia 265 Chapter 14 Database Issues 268 14 1 ODBC Driver Database Engine Errors oonooccconncnoncnonnncnnnnnononccnonanonnnnonnnncnonncnnnnnonn non n nono nn cnn nncnanccinnnss 268 Ns sce a ra E E a E A E E ea Ea a a TEE e NaS 269 Clear
150. NamePath 193 fileReadOnly 228 filesNamed 228 Find Menu Option 48 53 59 64 66 286 Find Again Menu Option 49 54 59 64 67 286 findByDate 295 findByFrom 295 findByID 295 findBySubject 295 findByTo 295 Firewalls 37 38 48 266 first 184 firstDayInMonth 211 221 firstDayOfMonth 211 221 firstSunday n 211 221 firstSundayInMonth 212 222 319 Index flash 246 floor 174 flush 225 235 Flush Log File Menu Option 57 Flush Mail Log File Menu Option 290 Flush Mail Queue Menu Option 288 forIndex macro 91 92 format 174 193 formatted 228 Formatted Text Files 281 formatted 229 Forms cache 54 55 148 257 Forms Cache 51 52 forRow macro 9 82 91 93 116 FoxPro 277 fraction 225 freeDiskSpace 229 From 308 fromArrayOfSubstrings separatedBy 197 fromDays 214 fromInteger 178 fromNonNullVars default 246 fromSeconds 217 fromString 178 215 217 fromString decimalSeparator 179 fromString12 218 fromString24 218 fromVars default 246 Full Trace Menu Option 289 fullDirName 229 fullHTMLRecord 237 fullHTMLRecord 237 fullPathName 227 fullRecord 237 G gcd 177 GET 6 57 64 80 97 115 124 244 245 259 getAnyLocalVariable 246 getFileTime 225 getGlobalVariable 246 getLetVariable 246 getLocalVariable 246 getMessage 238 getUserVariable 247 g
151. None Match header field The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction overhead It is also used on updating requests to prevent inadvertent modification of a resource that was not known to exist e If Range if a client has a partial copy of an entity in its cache and wishes to have an up to date copy of the entire entity in its cache it could use the Range request header with a conditional GET using either or both of If Unmodified Since and If Match However if the condition fails because the entity has been modified the client would then have to make a second request to obtain the entire current entity body e If Unmodified Since used with a method to make it conditional If the requested resource has not been modified since the time specified in this field the server should perform the requested operation as if the If Unmodified Since header were not present e Max Forwards may be used with the TRACE method to limit the number of proxies or gateways that can forward the request to the next inbound server This can be useful when the client is attempting to trace a request chain that appears to be failing or looping in mid chain e Pragma used to include implementation specific directives that may apply to any recipient along the request response chain All pragma directives specify optional behavior from the viewpoint of the protocol however some syste
152. ODBC drivers The entries in the collection are each an association The key to each association is the ODBC driver the value is a string of interest attributes of the driver See also 0DBCdriversHTML WebBase User s Guide 139 Chapter 9 Variables e ODBCdriversHTML e g see below formats the information about the available ODBC drivers for a nice printout on the browser as shown below The ODBC drivers in this list are those provided in the ODBC driver pack available from the WebBase web page or from Microsoft See also ODBCarivers Example 9 26 ODBCdriversHTML display ODBC Drivers 9 e Microsoft Access Driver mdb UsageCount 6809923 APILevel 1 ConnectFunctions YYN DriverODBCVer 02 50 FileUsage 2 FileExtns mdb SQLLevel 0 ConectFunctions YYN e Microsoft dBase Driver dbf UsageCount 6809923 APILevel 1 ConnectFunctions YYN DriverODBCVer 02 50 FileUsage 1 FileExtns dbf ndx mdx SQLLevel 0 ConectFunctions YYN e Microsoft Excel Driver xls UsageCount 6809923 APILevel 1 ConnectFunctions YYN DriverODBCVer 02 50 FileUsage 1 FileExtns xls SQLLevel 0 ConectFunctions YYN e Microsoft FoxPro Driver dbf UsageCount 6809923 APILevel 1 ConnectFunctions YYN DriverODBCVer 02 50 FileUsage 1 FileExtns dbf cdx idx ftp SQLLevel 0 ConectFunctions YYN e Microsoft Paradox Driver db UsageCo
153. Price DESC This will return a collection of records in which the years of the car are in ascending increasing order For any cars with the same year value their prices will be in descending order There are several other clauses that can be used with the SELECT statement and are described in SQL reference materials Again it is not the purpose of this section to cover everything about the SELECT statement There are many good references available in books and on the Internet that can provide additional details Chapter 6 ODBC SQL 74 SELECT WebBase Usage To use any of the above SELECT statements within a WebBase form the statement is enclosed within the sq macro and any explicit values are replaced with appropriate WebBase variables Let s assume that there is a form that asks the user what kind of car they want and they can select from several options including 2 door 4 door and hatchback The user s selection is stored in the WebBase variable kindOfCar The following WebBase expression will return all of the records from the Cars table that are of this particular kind sql to allCars source myAccess user fred password test SELECT FROM Cars WHERE Kind kindofCar sql true sql The only difference between the WebBase statement and an explicit SQL statement is that the explicit value 2 door is replaced by the WebBase variable na
154. S is arranged as a hierarchy both from the perspective of the structure of the names maintained within the DNS and in terms of the delegation of naming authorities At the top of the hierarchy is the root domain which is administered by the Internet Assigned Numbers Authority ANA Administration of the root domain gives the ANA the authority to allocate domains beneath the root The DNS is implemented as a collection of inter communicating nameservers At any given level of the DNS hierarchy a nameserver for a domain has knowledge of all the immediate sub domains of that domain The Network Information Center NIC is designated by the Defense Communications Agency DCA to provide registry services for the domain naming system on the DDN and DARPA portions of the Internet GET and POST requests A browser communicates with a server via either a GET or POST request The string of characters sent to the server begins with the sequence GET or POST followed by specifics as to the web page being requested any required parameters and various header record information such as the identity of the browser issuing the request The Initial GET or POST character sequence defines the syntax of the remainder of the request specifically the location and encoding of the optional parameters and whether these optional parameters are visible to the user at the browser making the request The author of an HTML web page has the ability to specify either
155. Server window as global variables but which do not appear in the System Registry These global variables identify classes of objects It is possible to perform operations on these classes see Chapter 11 for class operations it is also possible to create a new instance of a specific class assign it to a variable and perform operations on the instance The global variables and the class they represent are Array Array Association Association DatabaseInfo DatabaseInfo Date Date Dictionary Dictionary Directory Directory File File Float Float Fraction Fraction Integer Integer Number Number OrderedCollection OrderedCollection OrderedList OrderedList Point Point ReadStream ReadStream WebBase User s Guide ReadWriteStream Read WriteStream RegistrationDatabase RegistrationDatabase SortedCollection SortedCollection SortedList SortedList String String Time Time UniversalTime UniversalTime WriteStream WriteStream Editing Global Variables Adding or changing global variables is done using the WebBase WebWizard Registration Database utility Appendix B includes information on setting up the INI files used on 16 bit systems To edit WebBase global variables 1 10 11 12 Start WebBase and open up the WebBase WebWizard by entering the URL http 127 0 0 1 wowizard Select the Registration Database anchor From
156. Service Window Edit gt Copy this menu option provides the same functionality as described for the Late Breaking News Window Edit gt Clear All This menu provides the same functionality as described for the Late Breaking News Window Edit gt Find this menu option provides the same functionality as described for the Late Breaking News Window Edit gt Find Again this menu option provides the same functionality as described for the Late Breaking News Window WebBase User s Guide WebBase User s Guide 67 e Edit gt Set Lines this menu option provides the same functionality as described for the WebBase Transactions Service Window The global variable heartbeatMaxLines can also be set to specify the number of lines on this window e Status gt Posting enabled If this option is selected information will be written to the window If the option is turned off no check mark is displayed next to the option no data will be written to the window For example if posting is disabled there will be no messages displayed when a heartbeat command is sent out and a reply received The background of the window is darkened when posting is disabled The global variable heartbeatPostingEnable can also be set to true or false to enable or disable posting If set to false it will cause posting into the WebBase Heartbeat Window to be disabled when the window is opened either automatically via the heartbeatWindow
157. The following shows the LogFormat parameter 0 4 and the corresponding record format 4 Extended Combined Log File Format 3 Common Log File Format Extended Common Log File Format Extended Original WebBase EMWACS Log File Format Original WebBase EMWACS Log File Format ORD If the LogFormat parameter is not specified but the user enables logging all log records will be written using the Extended Common Log File Format Details on logging can be found in Chapter 12 errorLogFile optional the full pathname of the error log file created and maintained by WebBase for reporting operational errors These messages can be helpful in diagnosing problems you might encounter while WebBase executes WebBase will create the file but the directory specified must exist before executing WebBase During installation the default for this parameter is the directory containing program files e g CAWebBase and Logs WebError log If not specified no error log files will be generated It is strongly recommended that an error log file be maintained as this can be useful information in determining the source of program and application errors There is another error file error log which may be created in the directory containing the WebBase exe application if WebBase crashes due to a program error Default optional the name of the default file when a directory is referenced The defaults are default
158. This section describes all the operations that can be performed on integers Integers can also perform any of the operations described in the General Number Operations section above Integer Instance Operations Integers are always instances of the class Integer which is accessed via the variable Integer The Integer class operations that can be done are described in the following section and e g f 12 23 and gt 4 returns an integer representing the receiver bits ANDed with the argument asBoolean e g f 0 asBoolean gt false f 3 asBoolean gt true returns true if the receiver is non zero asCharacter e g f 123 asCharacter gt returns the character whose ASCII value matches the value of the receiver asFloat e g f 13 asFloat gt 13 0 returns a float representing the receiver as a floating point value asUnsigned e g f 12345 asUnsigned 4294954951 f 12345 asUnsigned gt 12345 returns a number representing the receiver as a 32 bit unsigned number authEncode e g f 123 authEncode gt w returns a character representing the receiver that has been encoded for use in the Basic Authorization capabilities within WebBase WebBase User s Guide 175 Chapter 11 Expressions 176 bitInvert e g f 123 bitInvert 124 returns an integer whose bit values are the inverse of the bit values of the receiver bitShift e g f 2 12345 bitShift gt 49380 f 2 12345 bitShift
159. Var Employee Name more WebBase statements removeUser uVar return lt vals gt The return macro designed to be used within a CALLed form posts the indicated values so that they can be read by the caller when the CALLed form completes see the cal macro for an example of how the return macro is used The return macro writes its values to the call it does not append them If there is more than one return macro in a CALLed form the last one executed is what gets returned The return macro can also be used within insert files that are designed to operate like subroutines an example is presented below with the scope macro The values posted by the return macro can be accessed via the returns dynamic variable For example return true varName 3 f 1 S returnss at gt true f 2 Sreturns s at gt value of varName variable f 3 Sreturns at gt 3 The value fields in the macro line are evaluated before being written thus variable names are allowed their values will be returned The return macro does not terminate processing of the form it occurs in it merely writes the return values so any output being generated for the browser following the return macro will still be processed scope scope The scope macro is used to create a variable context that is in existence for a specified amount of processing namely for all statements within the scope scope keywords Scope variables override loc
160. WebBase e g gif files do not include this header comment This comment can be seen by doing a View Source at the client browser The skipHeaderComment variable can be set to true which will cause this comment to not be included on any processed forms returned to the browser concurrentUsers e g 4 returns the number of concurrent commands being serviced by WebBase cookieDomain e g if this variable is set it becomes part of the cookie that is sent to the browser When one does a setCookie this variable along with cookieExpires and Y cookiePath are appended to the value of the cookie The default value of this variable is an empty string so it is not included in any cookie sent to the browser In this case the domain address used at the browser is the host name of the server that generated the cookie response The section on Cookie Local Variables earlier in this chapter provides additional details about cookies and domains It is important to note that the value of this variable is used at the time the cookie is created by the setCookie macro it is thus possible to change domains for cookies created within a single form by changing the value of this variable cookieExpires e g if this variable is set it becomes part of the cookie that is sent to the browser When one does a setCookie this variable along with cookieDomain and cookiePath are appended to the value of the cookie The ex
161. When developing the forms used within WebBase you will be using the WebBase language that is made up of variables macros expressions and operators These are described in detail in subsequent chapters The WebBase system has been developed to use object oriented features It is not necessary for users of WebBase to understand object oriented technology However there are a number of object oriented terms that are used throughout the remainder of this manual so they will be covered here e Class a template for defining the methods and data variables for a particular type of object All objects of a given class are identical in form and behavior but contain different data in their variables e Instance an object that belongs to a particular class For example abc is an instance of the class String e Message a signal from one instance to another that requests the receiver object to carry out one of its methods A message consists of three parts the name of the receiver the method it is to carry out and any parameters arguments the method may require to fulfill its charge WebBase User s Guide Chapter 2 Introduction e Method a procedure or operation that can be performed by an object In some software environments it is referred to as a function or subroutine e Object a software packet containing a collection of related data and methods for Operating on that data Object and instance are used int
162. a BE 178 Fraction Class Operations ieo eatea EN siaadanicsoueaks A A AA RAT O EEA aa 178 TIT NN 178 Point Instance Operations netee ainra eee a ea e e e aa e a rae a a a ea aa Sat 178 Point Class Operators iniciada r S 180 vi WebBase User s Guide WebBase User s Guide vil 11 8 General Collection OperatiONS oonooccnonccconoconnanononnncnonononccconononnnnononnc a a a A aa es 181 General Collection Instance Operations esseeeseseeeseesresereeseressttstrestrsrerstessreseresestesstesstessreseretesstessresete 181 Gener l Collection Class Operations insit an cra apa E a adapte r loch nscdnasenabeandseh Miptasiasase 185 IVO ATAY S airne nen e E OE EE gees AE iia 185 yO H KORS a o io YA e052 fant dada ll E E EE E EA 185 String Instance Operations e e eaaa AE A a A 186 Strings Class O oline RAEE a ces 196 SS o iarann O T TO 196 11 12 Ordered Collections ii a ai 197 Ordered Collection Instance Operations ooonocccnocncnonncnoncconnnnononccnonncnonnnonnnnononncnnncno nn nono crono nncnnncnonacinnnss 197 Ordered Collection Class Operations cceeseessseeceseeesseessseecsseecsseeessseecsaeecseecssaeeesseecsaeesseeenneeessaes 201 NN 201 11 14 Sorted Collect ermita Data 201 11 153 Sorted TISS iiien ts catdstyocatsths cotistvcsandaies cobhztassonda a T A T R R E TS 201 Sort d List Class Operations tutor 202 11 16 Associations oe 3 Moe ceet Sih ethos tes ed seb ta sk ones a eA seh Feed odes bab Ea tendons A wh otes bees
163. a GET or POST request for a form while a default GET request is generated for anchors used in hypertext linking htf files A file system extension that designates WebBase form files that contain standard HTML syntax plus WebBase macros and variables Synonyms WebBase output forms WebBase macro forms HTML Hypertext Markup Language Web pages are written in HTML so that the information they present will be displayed the same way by every browser available in theory at least HTTP server A computer system with a software package that responds to requests from browsers and returns the requested data The data returned is generally a specifically addressed file that may include data generated real time via a CGI script or the built in capabilities of the server itself such as the macro language provided with WebBase These software packages are called HTTP servers because their primary purpose is to serve data using the HTTP protocol However Web server is a better term because they often do much more than just speak a protocol Synonym Web server Hypertext searching amp linking Marking portions of a web page with anchors When a user selects the anchor generally by clicking the mouse while over the marked anchor another location on the current web page or a totally different web page will be made available to the user Input Forms A special type of HTML form It allows the web page author to request input from the user v
164. a format acceptable for use in the mail utility This operation can only be used if the user has purchased the E Merge add on option which is described in Chapter 16 asSeconds e g f dateTime asSeconds gt 3036647206 returns the number of seconds elapsed from January 1 1901 until the specified date plus the number of seconds in the time asTime e g f dateTime asTime 11 23 16 AM returns a string representing the time of the receiver Uses the OS to determine 12 hour or 24 hour format WebBase User s Guide e asTimel2 e g f dateTime asTime12 gt 11 23 16 AM returns a string representing the time of the receiver in 12 hour format e asTime24 e g f dateTime asTime24 11 23 16 returns a string representing the time of the receiver in 24 hour format e between and e g set dateTimel 8 00 00 AM dateTime timeFromString set dateTime2 8 00 00 PM dateTime timeFromString f dateTimel dateTime2 dateTime between and gt true returns true if the receiver is between the two arguments e date e g f dateTime date 03 19 97 returns the date portion of the receiver e dateAndTime e g f dateTime dateAndTime 03 19 97 11 23 16 AM PST returns an array containing 3 elements the date the time and the name of the timezone e dateFromString e g f 2 10 97 dateTime dateFromString 02 10 97 11 23 16 returns a new Universal time in which the date is as specifi
165. a test Writes the string argument to the little flash or current command pane in the server window below the menu bar Returns the contents of that pane which will have a Flash prefixing the string passed in WebBase User s Guide e fromVars default e g f set varl var default cmd fromVars default gt default Looks for a variable whose name is specified in the first argument a string containing one or more space separated variable names If the variable is found returns it value It is does not exist then returns the second argument This is useful to help determine if a variable exists and if not create it and set its initial value See also fromNonNullVars default and variableExists e fromNonNullVars default e g f set varl var default cmd fromNonNullVars default default This is the same as fromVars default except that if the variable is found but its value is null either nil or an empty string then treat it as if it does not exist and go on to the next variable or return the default if at the end of the list of variable names See also fromVars default and variableExists e getAnyLocalVariable e g f myLocalVar cmd getAnyLocalVariable gt returns the value of the first scope local variable whose name matches the argument The local scoping variables are checked first and then the local variables If no match is found returns nil and does not continue
166. abase 30 WebBase User s Guide The data source name used to access the database is required and is entered on the top line An optional description can be entered on the line below the database name Select the database file that will be accessed The WebBase database examples require the data source name to be myAccess this should be entered on the top line as in the display above The database to use is Autos mdb which is provided as part of the WebBase installation After this information is entered press the Advanced button to set up the username and password The window shown below is displayed Figure 3 20 ODBC Source Advanced Options Set Advanced Options x r Default Authorization ree Login name fred Cancel xxx Password m Options Type Value DefaultDir FIL MS Access ImplicitCommitS ync Yes MaxBufferSize 512 y 0 hd sul ean Dana Value of DefaultDir c SHTTP WwbWizard DBEx For the WebBase database examples the username should be fred and the password is test Note that the password is hidden when it is entered It is also important to remember that the data source name username and password are case sensitive When this source name is used within a WebBase form it must be explicitly entered as myAccess If MyAccess is entered an error will be returned indicating that this is not a valid source After all the inform
167. abase is the WebBase Autos mdb Used Cars example database that we distribute with WebBase The Autos mdb file itself is an MS Access 2 0 file but if one was to access it using the MS Access 7 0 ODBC driver under Windows NT 4 0 it becomes a candidate for generating the GPF error described above WebBase User s Guide 273 Chapter 14 Database Issues Fig 14 3 Example Startup Form to handle Access Workaround set Soutput false comment This is a startup form This form is being used explicitly as a workaround for the problem associated with accessing an MS Access database via ODBC while running under Windows NT 4 0 The preceding set Soutput false will prevent any text generated within this form newlines etc from being sent back to the WebBase server all such output would normally be displayed in the WebBase WebServer window in lieu of a browser as is done for normal htf forms comment errorProtect sql to temp source myAccess user fred password test keepHandle true SELECT FROM Cars WHERE ID 0 sql comment The above SELECT will always return zero records since we know that no entry in the database has an ID of 0 The following exit macro will report to the WebBase WebServer window the fact that the above SQL statement completed without an error comment exit OK onError comment If an error occurs while attempting to process t
168. able precedence order and the several ways in which local variables can be created it is very important that the form designer take care in the selection of variable names Set Local Variables The author of an htf form can define variables within the file using the set or setLocal macro Writing set counter 3 will create a local variable named counter and assign it the value 3 If a local variable by this name already exists its value will be updated to be 3 It is important to remember that local variables can be created by both setting them as described here by inputting them to the form as described in the preceding section or from header or cookie information sent from the client browser to the server as described in the following sections All these variables are considered local variables The creation of a variable with the set or setLocal macro can override any of these other local variables The scope macro has been designed for those situations in which some local variables need to be created for a specified amount of processing but which should not interfere with other local variables This situation is often encountered when using insert files to perform actions as would be done by subroutines The local variables created and used within the scope macro are only in existence until the ending scope keyword is encountered The local variables created within the scope macro can override any other local variables but only for the du
169. ables 115 Dynamic Variables 58 126 294 E elapsedDaysSince 211 221 elapsedMonthsSince 211 221 elapsedSecondsSince 211 elapsedTime built in command 27 elementsEqual 206 E Merge 283 Enable Cache Read Menu Option 54 Enable Cache TimeCheck Menu Option 55 Enable Log File Menu Option 56 Enable Mail Log File Menu Option 290 Enable Transactions Pane Menu Option 54 encode 86 192 encode parameter 120 155 ensure macro 89 entryValues 241 enumerateHTML titled 246 equals 192 WebBase User s Guide equalsIgnoreCase 193 eqv 210 Error handling 81 error log 36 errorLogFile parameter 19 36 errorProtect macro 89 90 91 106 escape macro 90 91 even 173 execute 226 exists 226 230 exists in 227 Exit Menu Option 48 53 59 63 66 285 exit macro 86 91 exp 174 Expires 134 256 exponent 178 Expressions 165 Extended Combined Log File Format 36 253 Extended Common Log File Format 36 253 Extended Original WebBase EMWACS Log File Format 36 255 Extension parameter 19 37 43 Extensions 39 45 303 305 F f macro 92 f macro 92 factorial 177 False 209 Features 1 Field variables 82 115 116 file 235 File DSN 29 File Streams Instance Operations 235 file 228 fileExtension 193 fileFullExtension 193 fileName 193 fileName extension 227 fileNameLessPath 193 file
170. ables and cookieVariablesHTML e cookieInVariableeHTML e g see below formats the names of all the cookie local variables received in the header of the request from the browser for a nice printout on the browser as shown below See also cookielnVariables YocookieVariables and cookieVariablesHTML Example 9 7 cookieInVariableseHTML display Input Cookie Variables 2 e CookieCounter 17 e WebBaseID W14259214E161808318465B e 9 cookieOutVariables e g Dictionary a dictionary of the cookie variables that have been created with the setCookie macro for return to the browser at the completion of form processing The keys to the dictionary are the cookie variable names the values are the contents of the cookies These outgoing cookie local variables will be returned as input cookies in the next request from the same browser if the browser is cookie enabled The dictionary returned by this variable is a copy thus modifying this dictionary will have no effect on the cookie variables active in WebBase This dictionary should be used for information only See also YcookieOut VariablesHTML cookieVariables and YcookieVariablesHTML e cookieOutVariableseHTML e g see below formats the names of all the cookie local variables created with the setCookie macro for return to the browser at the completion of form processing for a nice printout on the browser as shown below See also cookieOutVariables Yocookie Variables
171. ach mail message is sent without waiting for a previous message to finish The number of mail processes must be set to accommodate the specific mail server in use If the parameters of your mail server are set up to restrict its input handling but WebBase E Merge does not have a limit on the number of mail processes or the number is too large the WebBase Mail Service Window will show numerous error replies that the server is too busy When this happens WebBase E Merge requeues each mail that has not been delivered resends it gets another too busy error requeues the message and so on Setting a limit of concurrent mail in process eliminates these problems If you are not familiar with your mail server s capabilities experiment with the server and the mail process limit Too big a number of processes when sending a large volume of mail will result in the WebBase Mail Service Window reporting many error returns from the server The variable concurrentMailLimit defines the number of mail processes it defaults to O which means unlimited 286 WebBase User s Guide Figure 16 4 Number of Mail Processes Dialog Enter max processes 0 lt n O none Cancel e Status gt Show Mail Queue This option is only active if there are entries in the mail queue If selected the first line added to the window indicates the number of entries currently in the queue Subsequent lines display for each message in the queue the current date the
172. actions Pane option in the Options menu the WebBase copyright statement is displayed on a gray background If the server has been paused the status line has a red background In normal mode the status line displays a number of important pieces of information From left to right the data displayed is the command counter the concurrent commands in process and the status The command counter is separated from the concurrent commands in process by a The numbers are separated from the status by a e command counter this value starts at zero when WebBase is launched and is incremented whenever WebBase processes a command including the GIFs JPGs etc e concurrent commands in process this value is the number of commands that are either being processed or are waiting to be processed On most systems this value will be either 1 or 0 However if the server is loaded down with a mix of forms including heavy SQL access this value may be higher e status The status information is either the last command processed or a date time stamp with the server s status When a request is made of the WebBase server the status line will show the requesting browser s IP address followed by GET or POST and the command For example if a user is testing WebBase by sending the date Time command the status line would show 1 O 127 0 0 1 GET dateTime Once a minute a status process runs within WebBase to check
173. ah Teens eben 202 Association Instance Operations aiie hene eenen aE REEE EAEE EAE A A a E TAS 202 Association Class Operations cts iii oe vets Sues fell doi EEES Dia 203 117 Dictionaries Ii a E E E O AeniessAvarions 203 Dictionary Instance Operations usunn nvino I a E E ENE aE 203 Dictionary Class OperanOns s iiy isrea pe oenn ane eeo ee e eh ste EAE SERE EE eae ER step stat Ea EENE toaster EEA PSEA Say 205 11 18 Characters onda 206 11 19 Bo leanS ai e Se she aee aE EO Saute Dube EEA EEA EEEE ESES 208 1120 Dates ace A reae eea ea eeaeee e ets sees a sata SEEN 209 Date Instance Operations aerae Avion E a bias aati Aap tia E EOE E EEEE Maeda aes 209 Date Class Operations i soc E a pte 212 11 21 A saad ndashetaads acdentaass Sande vc E AE EAE E E EAE EE AE E ENEE a 215 Time Instance Operations ns snara ea ei ts date Taa Ea as 215 Time Class Operation 216 11 22 Universal TIMES coman EE 217 Universal Time Instance Operational dio abi idcdas Does ida paa Desde do Ea Daora Ea 217 Universal Time Glass Operas aiii brida 222 11 23 OdbcTimeStadpPrinasia di diia 222 A O TN 224 File Instance Operation cis 224 Elle Class Operations cia tl iio ilatina iii llei dsd 225 11 25 Directories italia 226 Directory Instance Operations comi dida 226 Directory Class Operations 0 25055 ose s0e4 eek i oben ali 228 11 26 Streams indie 229 Streami Instance Operations vieiis ieser Re tee E dond Ee E EE e EKE EKE saute leo AKE aeS S lees n EES nia 22
174. ailable on the WebBase web page Information on other WebBase add on packages can also be found at the WebBase web site WebBase User s Guide 47 Chapter 5 WebBase Windows Below these lines is the latest news information that is posted frequently by ExperTelligence This may include information on new releases bug fixes and documentation updates If you do not see the news information when you start WebBase it may be because e Your WebBase server is behind a firewall and cannot access the Late Breaking News data See Chapter 13 for information on firewalls e You are not on the Internet You can still use WebBase you will just not see any news in this window e The ExperTelligence server is unavailable In this case the Late Breaking News Window will display News server temporarily not available Please request Current User News later Errors that occur while WebBase is starting or running are also displayed in this window During the installation and configuration of WebBase it is suggested that this window be kept open to detect if any errors have occurred Menu Options All WebBase windows include a menu bar at the top of the window The Late Breaking News Window includes several very simple menu options Each of the menu options are described below e File gt Exit If this menu option is selected the Late Breaking News Window is closed It is possible to run WebBase without this window o
175. aining only the numeric values contained within the receiver e parseAt e g f one two three parseAt gt OrderedList one two three returns an ordered list of items generated by parsing the receiver using the parse character argument If the receiver does not contain the parse character returns an empty list This process is reversible using the concat operations described above Note that the argument can be either a string or a character e parseAt into e g set cltn one two three parseAt f cltn four five six parseAt into gt OrderedList one two three four five six returns the second argument which is an ordered list The receiver is parsed using the first argument and the result s are appended to the collection in the second argument If the receiver does not contain the parse character returns the second argument Note that the first argument can be either a string or a character e parseAtAny e g f one two three parseAtAny gt OrderedList one two three returns an ordered list of items generated by parsing the receiver using any of the characters found in the input argument If the receiver does not contain any of the parse characters returns an empty list e parseAtAny into e g set clin one two three parseAt f cltn four five six parseAtAny into gt OrderedList one two three four five six returns the secon
176. al variables for the duration of the scope The scope macro creates a topmost scope variables dictionary that is searched before any other already existing scope dictionaries Then the local variables user variables etc are searched as necessary As soon as the scope keyword is encountered the scope dictionary for that particular scope is removed so those scope variables are no longer accessible in subsequent processing of the form It is possible to nest scopes to create nested levels of scope dictionaries all of which might be searched when looking for a particular variable The innermost scope is the first to be searched followed by the next scope followed by any other scopes and then finally the local variables user variables global variables and dynamic variables Field variables within a scope will still take precedence over any other variables The scope macro example below shows how insert files work great as subroutines This particular insert file creates a directory whose pathname is passed in as the variable DIR_ WebBase User s Guide 101 Chapter 8 Macros It will check to see if any intermediate levels of directory are required and if so make a directory at each level The scope macro is used because the variables DIR_1 and DIR_2 are created with the set macro and the variable DIR_3 is created with the forRow macro These variables have no value outside this insert file and could possible override exis
177. all browsers support cookies and some users disable cookie support on their browsers due to security considerations Another alternative 160 WebBase User s Guide needed to be found to allow state between forms WebBase provides user variables to maintain state information without the necessity of cookies User Variable Design If the form designer is setting up user variables the default value of WebBaseID for YouserName can certainly be used However this requires all accessing browsers to be cookie enabled In some Intranet configurations this may be acceptable However as noted above not all browsers support cookies and some may not have cookie support enabled If the forms designer relies on the default value of WebBaselID for the value of userName and the browser does not return cookies to the server a new WebBaselD will be created for each request received from the browser All user variables created on the first form will be stored in a user variable dictionary associated with the first WebBaseID Any user variables needed or created on the second form will be stored in a user variable dictionary associated with the second WebBaselD Form 2 will not have access to any of the user variables from form 1 because it does not have the same WebBaselD as used on form 1 There is an easy solution to this problem The form designer can create a token as a local variable using the value of WebBaseID or nextCookield For example
178. ally replaced by the value of the variable In the above example any references in the file to name are replaced by the string Denny The form designer should include some code to verify that appropriate values were entered For example if a field is to contain only numbers then an error should be returned back to the user if they entered a non numeric value Error checking such as this should be done before any data processing to ensure that only valid data is being used in computations and database interactions It is much easier to correct data before it is stored in the database than to have to try to correct it once it is stored in the database The WebBase WebWizard basic example 7 shows how to do error checking and return error information to the user Error checking can also be done using Java applets or JavaScript as part of the initial FORM statement An example of using JavaScript for error checking is provided in the Java examples also accessible from the WebBase WebWizard table Once the data has been validated it can be processed Continuing with the example from the previous section the file getname htf that is accessed by the GET query is displayed in Fig 2 1 This file does a database query checks to see if there are any results returned from the query and then displays appropriate information to the user All WebBase expressions and variables are in bold The sq macro starting with sql and endin
179. already passed domain matching then the pathname component of the URL is compared with the path attribute and if there is a match the cookie is considered valid and is sent along with the URL request The path foo would match foobar and foo bar html The path is the most general path If the path is not specified it as assumed to be the same path as the document being described by the header that contains the cookie This attribute is set using the cookiePath variable which by default is set to 7 122 WebBase User s Guide Receiving Cookies When requesting a URL from an HTTP server the browser will match the URL against all cookies and if any of them match a line containing the name value pairs of all matching cookies will be included in the HTTP request Here is the format of that line Cookie NAME1 OPAQUE_STRING1 NAME2 OPAQUE_STRING2 T T WebBase extracts the cookies from this line and makes each cookie name a local variable A cookie variable can be deleted using the removeCookie macro NOTE Cookie variables are sensitive to the way in which the host machine is addressed To ensure that the server properly receives cookie values make sure your links are consistent in the way they reference your host machine Referencing your host as http www yourSite com in one instance and as http 1 2 3 4 in another instance might be pointing to the same host machine but will cause the Cookies con
180. alue if one is specified follows each key name The results of the above are 240 WebBase User s Guide Parameters xampleKey xampleValu Variables Extensions Aliases e printHierarchyOn indent e g set strm String new WriteStream on f strm SOFTWARE ExperTelligence Inc WebBase 4 10 kRegistrationDatabase localMachine at printHierarchyOn indent f strm contents gt lt see below gt returns the receiver after adding its hierarchical representation to the stream specified in the first argument The second argument defines the initial indentation each subsequent level will indent 3 more spaces X Darameters xxxxk k X X exampleKey xampleValu KX Variables X X EXtensions XKX XKXXX A iases ple e publicKeys e g f SOFTWARE ExperTelligence Inc WebBase 4 10 RegistrationDatabase localMachine at publicKeys gt OrderedCollection Parameters Variables Extensions Aliases returns a collection of the keys of the receiver Windows reserved keys are not included e removeKey e g f exampleKey regDB removeKey gt aRegistrationDatabase returns the receiver after removing the subkey named in the argument e value e g set assoc exampleKey exampleValue Association key value f assoc regDB add f SOFTWARE ExperTelligence Inc WebBase 4 10 Parameters exampleKey RegistrationDatabase localMachine at valu
181. alues The operation is performed on the receiver and argument the result is placed back onto the stack There are now two values on the stack the original value of Shipping and a the product of Total and TaxRate The last component in the expression is the operator The top value on the stack is popped off this is the receiver of the operator The next value on the stack and the only remaining value is popped off Shipping The operation is performed the result of summing the receiver and the argument is returned as the value of the expression The next example includes a operation with multiple arguments It will determine whether 15 is between 10 and 20 Although this example does not include as many stack operations as the previous example it shows how multiple arguments are placed within the WebBase expression and onto the stack f 10 20 15 between and 166 WebBase User s Guide Example 11 2 Detailed RPN Example The first component encountered is 10 which is a constant so it is placed directly onto the stack Next is 20 which is another constant its is also placed directly onto the stack Next is 15 another constant that is placed onto the stack The stack now contains three values the operation The next component is the between and operator The top value on the stack is removed this is the receiver for This operation requires two arguments so the two previous L
182. alues are displayed in the table 10 To add a new alias select the Add new entry anchor and specify the alias name and desired value 11 To modify an alias select the Edit anchor next to the extension and specify the changed value 12 Stop and restart WebBase so that the new modified aliases will take effect 4 4 Multiple Domains WebBase supports multiple domains One can set up multiple IP addresses in the TCP interface to reference the same physical machine For example a single machine may be configured to support addresses 1 2 3 1 1 2 3 2 1 2 3 3 and 1 2 3 4 The machine may also be known by 127 0 0 1 which is the default local host way of addressing the system but only from itself The WebBase serverAddress variable returns the IP address based on how the server was addressed Since different behavior may be desired depending on how the server is addressed WebBase allows the user to define different domains Within each domain it is possible to define the desired behavior with respect to parameters aliases and extensions The following parameters can be defined for each domain If not explicitly specified the default value of the parameter as described earlier in this chapter is used e Directory the directory containing various form files or subdirectories containing forms files This directory is only relevant to a user coming in at this IP address or domain e Default the name of the defau
183. am of characters that will be returned to the browser These characters are the HTML tags and data to be displayed Much of the data to be displayed is the result of evaluating WebBase expressions The returned stream does not include any WebBase expressions it simply includes the results of evaluating the expressions WebBase User s Guide Chapter 8 WEB Ls UN A Y comme IWacros Invariably one needs to add some intelligence to forms The WebBase macro language allows tremendous flexibility in processing files Macros within WebBase are the means by which one specifies database SQL statements and performs logic on variables including the results of SQL queries such as IF THEN ELSE constructs FOR loop iterations and CASE statements The WebBase macro language allows you to create Dynamic HTML web pages that respond to user input as well as database search results 8 1 Overview of WebBase Macros WebBase macros are expressed in one of two formats e Single expression format The entire macro is expressed within a set of curly braces e g insert filename HTF or set counter 3 This format is similar to the HTML lt P gt or lt INPUT gt construct e Start and end expression format The macro is begun with one single expression statement e g if counter 3 and is terminated with a second single expression statement e g if This format is similar to the HTML lt TITLE gt lt TITLE gt construct So
184. ample Boi NDEEPDA 20 6 txt The prefix flags are e no prefix an error is generated if the specified attachment is not found at mail macro merge time or at mail send time and the mail is not sent e 00 or 40 prefix same as no prefix above e 16 or 50 prefix the existence of the attachment is checked at mail send time and if missing an error is generated and the mail is not sent e 2 or 60 prefix the existence of the attachment is checked at mail send time and if missing a text attachment to that effect is sent instead e 30 or 70 prefix the existence of the attachment is checked at mail send time and if missing the attachment is ignored as if never specified No prefix and values O through 3 use the pathname extension to determine if the file is a text attachment txt htf hti If not the contents of the file are encoded in base64 encoding and sent Prefix values 4 through 7 can be used to indicate that for files sent as base64 encoded files the file contents have already been so encoded and thus can be sent as is This can be a very efficient way of attaching a non text binary file that is to be attached to many WebBase User s Guide 291 Chapter 16 E Merge emails It can be encoded once and the overhead of encoding it for each and every email can be eliminated The base64encodeFile to operation on String allows one to perform such encoding of a source file to a destination file specifying
185. an gt 0 24497866 returns the arc tangent an angle in radians of the receiver asBoolean e g f 00 0 asBoolean gt false f 0 1 2 asBoolean gt true returns true if the receiver is zero otherwise false The argument is required but ignored internally so any value can be used asInteger e g f 13 6 asInteger gt 14 returns an integer representing the receiver as an integer equivalent to rounded asNumber e g f 13 6 asNumber gt 13 6 returns the receiver between and e g f 5 25 20 between and gt true returns true if the value of the receiver is between the first and second arguments otherwise false ceiling e g f 12 7 ceiling gt 13 f 12 3 ceiling gt 13 returns an integer that is rounded up to the next highest integer from the receiver containsInteger e g f 13 containsInteger gt true f 13 7 containsInteger gt false returns true if the receiver is an integer or a string representation of an integer otherwise false containsNumber e g f 13 7 containsNumber gt true returns true if the receiver is a number or a string representation of a number otherwise false cos e g f 1 cos gt 0 54030231 returns the cosine an angle in radians of the receiver degreesToRadians e g f 360 degreesToRadians gt 6 28318531 returns a number representing the receiver converted from degrees to radians denominator e g f 17 3 denominator gt 1 f 3 10 denominator
186. and the file returned back to the server system people may have added new records to the database These will then be lost when the new version is copied onto the server Clearing Caches If ODBC connection caching is disabled then access to the database file should not present any problems However it is recommended that ODBC connection caching be used if at all possible with WebBase to improve performance If ODBC connection caching is enabled all connections to the database must be released before the database is accessible Chapter 12 provides details about ODBC connection caching including how to clear the cache In order to update a file it is necessary to turn caching off as well as clear the cache If you clear the cache without turning caching off then any connections currently in use are restored to the cache when the request is completed Because these connections are in use either active or back in the cache you will not be able to access the database In addition any users making new requests of pages that access the particular source username will have new connections generated and cached This again prevents database modifications from being made During form development changes to a database will often need to be made With ODBC connection caching enabled these connections can be cleared out by simply doing selecting to Clear ODBC Cache via the WebBase WebServer window The database can be edited and then form deve
187. and cached once per form the first time it is referenced Although most forms are processed very quickly there are some database queries that can take some time This introduces the possibility that the form could start processing on today and complete tomorrow If the processing of a form will take some time and date information is critical the forms designer should create a local variable using an expression like set curDate Date today each time the date is needed instead of using date This will eliminate any problems with the caching of date and ensure the proper date is used dateTime e g 03 10 97 06 01 54 the date and time It is accessed from the operating system and cached once per form the first time it is referenced The time is in the local time Although most forms are processed very quickly there are some database queries that can take some time If the processing of a form will take some time and date time information is critical the forms designer should WebBase User s Guide create a local variable using an expression like set curDate UniversalTime now each time the date and time are needed instead of using dateTime This will eliminate any problems with the caching of dateTime and ensure the proper date and time are used e defaultExtensionsHTML e g see below formats all the extensions specified for the WebBase server for a nice printout on the browser as shown below Chapter 4 inclu
188. and y coordinates of the argument respectively otherwise answer false e gt eg f pointl point2 gt gt true returns true if the x and y coordinates of the receiver are greater than the x and y coordinates of the argument respectively otherwise answer false e gt e g f point point2 gt gt true returns true if the x and y coordinates of the receiver are greater than or equal to the x and y coordinates of the argument respectively otherwise answer false e abs e g f point point2 abs gt 1 1 returns a new point whose coordinates are the absolute values of the x and y coordinates of the receiver e between and e g set point3 5 7 Point x y f point point3 point2 between and gt true WebBase User s Guide 179 Chapter 11 Expressions 180 returns true if the receiver is greater than or equal to the first argument another point and less than or equal to the second argument yet another point otherwise false dotProduct e g f point point2 dotProduct gt 42 returns a number which is the sum of the product of the x coordinates and the product of the y coordinates of the receiver and the argument max g f pointl point2 max gt 4 6 returns a new point whose coordinates are the maximum of the x coordinates and the maximum of the y coordinates of the receiver and the argument min e g f point point2 min gt 3 5 returns a new point whose coordinates are the minim
189. are always instances of the class Float which is accessed via the variable Float The Float class operations that can be done are described in the following section asFloat e g f 13 5 asFloat gt 13 5 returns the receiver exponent e g f 423 543 exponent gt 8 0 returns a float whose value is the exponent part of the floating point representation of the receiver printOn decimalSeparator e g set strm String new WriteStream on f strm 123 45 printOn decimalSeparator f strm contents gt 123 45 appends the ASCII representation maximum of 8 digits of the receiver to the stream identified in the first argument using the second argument as the decimal separator Note that the second argument must be a string significand e g f 423 543 significand gt 1 65446484 return a float whose value is the significand part of the floating point representation of the receiver Float Class Operations The Float class is accessed using the variable Float The following operations can be performed on this class fromInteger e g f 123 Float fromInteger gt 123 0 returns a floating point representation of the integer argument fromString e g f 0 593 Float fromString gt 0 593 returns a floating point conversion of the string argument The argument is expected to be a sequence of the form digits decSep digits Ele I digits fromString decimalSeparator e g
190. ariable logEnabled should be set to make any persistent change to whether logging will be done Figure 5 15 Enable Log File Confirmation Dialogs 56 Please Confirm gt Clicking Yes will Y open a log file and start logging transactions Please Confirm p3 Clicking Yes will stop logging transactions and close the current log file Start logging Transactions J Stop logging Transactions Jw Flush Log File This option is only active if logging is enabled Information to be written into the log file is buffered until sufficient data has been obtained at which point it is WebBase User s Guide WebBase User s Guide 57 written to the log file on disk If this option is selected any information in the buffer is written to disk This ensures that the information the user views in the log file is all that has been generated Help Menu Options e Current User News this menu option provides the same functionality as described for the Late Breaking News Window If the Late Breaking News Windows is not open it will automatically be opened and brought to the front WebBase Server Window Status Line The status line displayed beneath the menu bar on the WebBase Server Window provides information about the current state of the system The status line is normally displayed in white when it is active If the user has turned off the status information by deselecting the Enable Trans
191. art of the sql macro If these values are set up using global variables and the values subsequently change only the global variable s value has to be edited not multiple forms Any sq macros that reference these variables will now work successfully Global variables should be used to hold information that is used in multiple forms and that changes very infrequently Some suggested uses of global variables are image directories e g myPix gt http www myCompany com images gifs e mail addresses e g eMailAddr gt WebMaster MyCompany com and copyright statements e g copyright gt 1997 MyCompany Inc Should your system configuration s change and your WebBase server be moved to a different site or machine you would need only to alter a few variables in one location and not edit numerous forms All global variables are extracted from the System Registry when WebBase is launched Unlike parameters it is possible to change the value of a global variable in the System Registry and have the change reflected in WebBase The Load Global Variables command in the WebServer window s Options menu causes WebBase to re read all the global variables from the System Registry Any in memory changes to global variables made using the setGlobal or removeGlobal macros will be lost unless they were explicitly added to the System Registry There are a number of global variables that are displayed in the WebBase
192. as shown in the example below errorProtect some WebBase scripting onError lt H2 gt Sorry but we could not satisfy your request lt H2 gt if Slocal browser is on the host display the error that occurred f Serror messageText if errorProtect err401 e g see below generates the 401 Unauthorized error message text This is displayed 1f Basic Authentication is being used and the user does not properly enter a username and password or the user s browser does not support Basic Authentication Example 9 14 err401 display 401 Unauthorized Proper authorization is required for this area Either your browser does not perform authorization or your authorization has failed err403 e g see below generates the 403 Browsing not permitted error message text This is displayed if directory browsing is enabled but the directory or filename entered by the user is in a directory that has been marked for no browsing by inclusion of a file named NOBROWSE Example 9 15 err403 display 403 Access to the requested file or directory is not permitted Access to the requested file or directory is not permitted err404 e g see below generates the 404 requested URL not found error message text This is displayed if the user enters a filename that is not found This is also displayed if a directory included in the URL does not exist Example 9 16 err404 display 404 The requested URL was
193. atch case features of WebBase one can determine how to respond to a click at a given x y coordinate and either present information directly from the current pseudo MAP form or use the reDirect macro to point the user to another location to handle that coordinate mouse click The example presented below in Fig 12 6 tests for the x coordinate being between 100 and 150 and the y coordinate being between 200 and 300 If this condition is true the user is redirected to another web page Inline HTML can also be returned as part of the appropriate if else end if structure WebBase User s Guide Fig 12 6 Example ISMAP image code if 100 150 x between and 200 300 Sy between and reDirect url if A more detailed example using an ISMAP image is presented with the WebBase WebWizard More Examples table WebBase User s Guide 261 Chapter 13 Security ee 5 Security Chapter 13 This chapter discusses how WebBase forms can be made secure using Basic Authentication and directory browsing Information on configuring firewalls to allow WebBase access is also presented 13 1 Basic Authentication Basic Authentication is used by browsers for authenticating access to files and or directories Upon receipt of an unauthorized request for a URL the server responds with a challenge requesting authorization To receive authorization the client sends a user name and password If an improper or invalid user name
194. ation has been entered close the Advanced Options window and the Setup window The list of System DSNs is updated to reflect the data source name just entered A data source must be created for each database that you will be accessing using WebBase These data sources may use the same driver or different drivers depending on the type of database Simply follow the above steps and give each database a unique data source name 3 8 Installing WebBase as a Windows NT Service On a Windows NT system it is possible to set up WebBase as a service so that it will start automatically when the system is booted without requiring user logon or any other user action It is strongly recommended that you first install WebBase according to the above instructions and verify that it has been successfully installed and is communicating Following this process will minimize problems in setting up WebBase as a service WebBase User s Guide 31 Chapter 3 Installation Installation as a Service During the installation of WebBase under Windows NT the parameters required to run WebBase as a service are automatically stored into the System Registry under HKEY_LOCAL_MACHINE System CurrentControlSet Services HttpSsQoL The two parameters required to run WebBase as a service are AppDirectory and Application These are described in Chapter 4 Note that this registry location is different than where all the other WebBase parameters are stored This is to pre
195. ave to be the same between the two tables only the contents are used to match up records The following SELECT statement would be used to retrieve records from both tables SELECT ct Year ct Maker ct Model ot Name ot Address ROM Cars ct Owners ot WHERE ct OwnerID ot ID zal Note that each table is assigned an abbreviated name and this abbreviated name is used to specify which fields are used or retrieved from which table This is required if there are fields in both tables with the same name that may have different values If there are no field names common to the two tables then the abbreviated names do not have to be used and the above statement could be written as WebBase User s Guide WebBase User s Guide 75 SELECT Year Maker Model Name Address FROM Cars Owners WHERE OwnerID ID A join is also referred to as an INNER JOIN An equivalent way of writing the above would be SELECT Year Maker Model Name Address FROM Cars INNER JOIN Owners ON Cars OwnerID Owners ID This latter format is used by database applications such as MS Access It is often useful to create the query within the database application and verify that the query is correct for a representative sample of data and selection criteria Once the query is working many applications can display the query in SQL format Join queries will often use the above format WebBase can accommoda
196. batch file and WebBase will start Stopping the Service WebBase was not designed explicitly as a service application and uses a Microsoft utility to run as a service In order to stop WebBase when it is running as a service you must use the WebSvStop bat file that is provided with the WebBase installation If you stop the httpSQL service from the Services Control Panel only the Microsoft utility used to start WebBase is stopped WebBase itself is not stopped To stop WebBase simply execute WebSvStop bat and WebBase will properly terminate If WebBase does not come up properly as a service and appears to hang stop it using WebSvStop bat Delete the file WebBase bmp from the directory in which the WebBase exe program resides This file is the splash screen displayed when WebBase launches Under some circumstances this file can cause WebBase to hang and not respond to communications commands although the Services control panel and task list show it to be running 32 WebBase User s Guide If your NT system goes down unexpectedly and auto reboots you do not have to stop and restart WebBase as a service You only need to follow the above procedure if you are taking WebBase down and bringing it back up with the NT system continuing to run Removing the Service Entry To remove WebBase as a service entry the WebSvDel bat file is used This file first attempts to stop WebBase and then removes it as a service entry The WebBase applicati
197. bringing back some fields by specifying exactly what fields you want instead of using the you should see a performance improvement The bigger the gap between what you are asking for versus what you would get with the bigger the Improvement How can I make database search results clickable references Simply wrap a lt A HREF gt lt A gt around the field you are displaying You can include information in the HREF string to specifically identify the field being clicked on For example assume the field name is in fName lt A HREF someForm htf item fNam ncode true gt fName lt A gt Now when one clicks on the value displayed by fName the form someForm htf will be called and it will have a local variable named item with the value of fName The encode true is necessary only if fName might contain non alphanumeric characters since browsers do not encode the HREF strings like they do the values of lt INPUT gt items within a lt FORM gt which is how one usually calls other forms passing in arguments The encode true will NOT hurt anything if the fName field does NOT contain any special characters or spaces so in general it is a good idea to use it when including fields within an HREF string In a similar fashion it is possible to create graphical or text based buttons to perform the submit and reset functions just like a post or get Just place an anchor lt A HREF gt lt A gt around your
198. browser e Name This string is a sequence of characters excluding semi colon comma and white space It must also adhere to the WebBase variable standard which requires the first character to be alphabetic or e expires The attribute specifies a date string that defines the valid life time of that cookie Once the expiration date has been reached the cookie will no longer be stored or given out If not specified the cookie will expire when the user s browser session ends e g they shut down their browser application To cause a cookie to be persistent on the client side the form designer must specify an expiration time This attribute is set using the YocookieExpires variable which by default is not specified e domain when searching the cookie list for valid cookies a comparison of the domain attributes of the cookie is made with the Internet domain name of the host from which the URL will be fetched If there is a tail match then the cookie will go through path matching to see if it should be sent Tail matching means that domain attribute is matched against the tail of the fully qualified domain name of the host A domain attribute of acme com would match host names anvil acme com as well as shipping crate acme com This attribute is set using the cookieDomain variable which by default is not specified e path used to specify the subset of URLs in a domain for which the cookie is valid If a cookie has
199. browser does support cookies this information will be stored on disk and loaded into memory each time the browser starts up In addition to storing the information as user variables it is also written into a database table that contains fields for name address e mail tokenID and browserAddress The tokenID is the unique token returned to the browser as a cookie and used as the user variable dictionary name The browserAddress is set to browserAddress the IP address of the client browser Several days later the user again visits the same site Instead of again having to fill in his name address and e mail address he is greeted by name There are two reasons this is possible First if the user s browser supports cookies the initial cookie which was sent from WebBase to his browser was stored by the browser and was returned to the WebBase server as part of the request A simple SQL SELECT statement was used to query the database to see 1f there were any records for this unique ID If a match is found then the information in the database 1s loaded into a user variable dictionary with the specified unique name If no matches are found it may be because the user has never visited the site or because his browser does not support cookies In this case another SQL SELECT query is made to see if a match can be found based on the incoming browserAddress If a match is found then again the user variable dictionary is set up and populated wi
200. by the user comment This is a short comment ensure onExit ensure The ensure macro is very similar to the errorProtect macro in that it is used to ensure that some action is taken regardless of whether the protected block terminates normally or not With the errorProtect macro one executes the onError clause only if an error occurs The onExit clause of the ensure macro is executed regardless of whether the code preceding the onExit statement completed normally or with an error The example presented below ensures that the file opened for reading is closed even if an error occurs while reading This can be particularly problematic on exclusive access open for writing files Without using this macro if an error occurs the file will remain open until you terminate WebBase as there is no handle to the file or stream by which it could be closed WebBase User s Guide 89 Chapter 8 Macros 90 Example 8 10 ensure Macro ensure set filestream foo txt File pathNameReadOnly read from the stream onExit f filestream close ensure errorProtect onError errorProtect The errorProtect macro is designed to trap errors that might occur during the processing of your WebBase htf form and allow you to return a more meaningful message to the browser than the default error information ordinarily returned by WebBase Any error that occurs in the statements following the errorProtect keywor
201. c temp encoded htf returns the path to the file created by encoding the file whose pathname is the receiver using base 64 encoding The first argument is either an integer or a Boolean If an integer it defines the number of base64 encoded characters to output before inserting a newline sequence carriage return line feed If it is a boolean true means to automatically insert the newline sequence after 64 characters If false no newline sequences are inserted See also base64DecodeFileTo These operations are used by the mail macro and setting up mail attachments to be sent characterConstant e g f w characterConstant gt w f w characterConstant gt nil returns the character constant if and only if the first character of the string was a otherwise returns nil classBaddr e g f 123 45 6 78 classBaddr gt 123 45 returns the class B address portion of the receiver if it is formatted as an IP address otherwise returns an empty string classCaddr e g f 123 45 6 78 classCaddr gt 123 45 6 returns the class C address portion of the receiver if it is formatted as an IP address otherwise returns an empty string collapse e g f aspace and tab collapse a space and tab returns a copy of the receiver with all control characters replaced by a single blank and all multiple blanks replaced by a single blank This is useful for removing multiple spaces or other characters e g tabs that the b
202. ccescesessecsesssctcsesssnesessenseseesstcesensnsccsessncecseenseccstensccestensceessetesseseesecses 12 WebBase Files Generated During InstallatiON oonnnncnonccnnnncnononcnonnnnnoncnonanononncnnnnononnnnnnnncnna non nn con ncninnss 13 3 3 Standard WebBase Installation cceeecccceeseccceeeeeeeeeeeeeeeceesneceseeaeeceesnneeesssaeeeeeseaeeceeenaeeeeeenneeeeseeeeers 14 Parameter Definition RNA 18 Completing the Installation 0 ee eeseeseecsseeeseeeseecsaeecscecssaeeesaeecsaeecsseecseecesaeessaeecsaeesseesenaeeeeaeessaeees 19 3 4 Custom WebBase Installati ott sc sccaccccscavedsesentd cvescans odian cove R dida dada oui sarees 21 3 3 Updatino WEBB ase iii ia EO E dean vnc EO a ada 23 3 6 Testing the WebBase Installation cccccceeeeccceeeencceeeseneeeeeeacececenaeeceeeeeeecseeeeeeseneeecesnneeeeesnneeeeeneeeens 24 Possible Installation Problems cccsccceeeesceceeeeeceeesenceeceseneeecesneeeeeeaeeeeseeaeeesecnaeeeseeaeeceseeaeeeseenneeeeees 25 Testing WebBase Communications secceseccesseessscesescecescecesseeesaeecsacecsseecesaeeesaeeesaeecsseeseneeeesaeeesaeers 26 B iltin Commands sosesc nn EEEE E EE EEE E E S 26 327 Anstalling ODBC Drivers ices siih seis seancsanseascendecesdenaness caaecdesduaenens cass ceensealgenseacestendeactessancdguenvenggendatenddneasiepen 27 ODBC DPI CLS oa estes desc OO NN 27 Installing the ODBC Drivers caia 28 Setting the ODBC Sources 20 0 e ce eecceseseeesseessseessnee
203. ccess your stored procedures as defined by the SQL query language for your database For example 1f there is a stored query called gryQuery it would be used in WebBase as sql to lstqueryl source ODBC Connect user password SELECT FROM qryQueryl sql However WebBase does not currently support passing parameters into stored procedures WebBase User s Guide 279 Chapter 15 WebBase Q8A 280 Can I use a formatted text file with WebBase and ODBC The ODBC Driver packs provided with WebBase include a Microsoft Text Driver Via ODEC you select MS Text File Driver and specify a directory in which your text file resides Specify the file type if necessary Select the Define Format option within the ODBC Text Driver Setup window and select the text file to be used Identify the type of delimiters and set up the column information The result is a Schema ini file You can then write an htf file that accesses this source and perform database interactions as with other relational databases Any suggestions on improving performance when using WebBase The most expensive part of the ODBC interface process is the binding of the returned results to the WebBase data structures You should only retrieve the fields to be used in computations display within a SELECT statement If all fields are retrieved more complex data structures have to be built within WebBase that require both time and memory If you avoid
204. ce indexing is 1 based but integerBelow returns values from 0 through the limit 1 set rand 1 limit Srandom integerBelow Make random selection set selection rand answers at reservedWords e g SortedList ascending call case changed class comment commit concat copy debug dependents descending dll edit else encode ensure errorprotect escape evaluate exit f f false forindex fork Forrow free get grow halt hash htf if include insert inspect invoke mail match match munge nil no onerror onexit otherwise output parallel parse patternmatch post print quote redirect redirect2 release remove removeall removecookie removeglobal removelocal removeuser repeat return rollback scope sender set setcookie setglobal setlocal setstring setuser shoppingitem signalerror size species sql timer transact true value verity while with writefile yes yourself the reserved words within WebBase that should not be used for variable names as errors will result The reserved words include all WebBase macro names as well as several Operation names that can be applied to any WebBase data type If the user attempts to create a local variable using any of the set macros an error will be d
205. ce_Driver This operation is useful to obtain information that is to be displayed within a lt TABLE gt construct as in the WebBase WebWizard ODBC Viewer utility odbcDrivers e g f Databaselnfo odbcDrivers gt SortedCollection Microsoft Access Driver mdb gt UsageCount 6811003 APILevel 1 ConnectFunctions YYN DriverODBCVer 02 50 FileUsage 2 FileExtns mdb SQLLevel 0 ConectFunctions YYN returns a sorted collection of associations The key to each association is the name of the ODBC driver the value is a collection of strings defining the different attributes of the driver e g UsageCount APILevel ConnectFunctions odbcDriversSQL e g f Databaselnfo odbcDriversSQL gt OrderedCollection an OdbcRowObject returns an ordered collection containing OdbcRowObjects representing each ODBC driver This collection can be iterated through the using forRow macro to look at the information contained within each driver The attributes of each driver are set up as fields e g UsageCount APILevel ConnectFunctions This operation is useful to obtain information that is to be displayed within a lt TABLE gt construct as in the WebBase Web Wizard ODBC Viewer utility odbcDriversSQL2 e g f Databaselnfo odbcDriversSQL2 gt OrderedCollection an OdbcRowObject returns an ordered collection containing OdbcRowObjects representing each ODBC driver This collection can be iterated through t
206. ceeceeeneeeceeneeeeeseaeeeeeenaeeeeeeaeeecessaeeeseeneeeeeeeas 105 SOLUSer Svat Val AA OT 106 signalError error tex SS Fosi Sees fork eave des Sees fe E E Ee NT 106 EDI O RNA 107 timer id lt idVal gt lt args gt timer c oooooococnnooccccnnoncnnnnononnnnnonnnononnnnnononnnnnnnnnnn nn non nono rnnnnnnnnnnnnnnrnnnnnnnnnnnes 110 while lt Exp gt Wilton 111 AS O ON 112 writeFile lt file gt lt optionalArgs gt writeFile ooooooocnnnnccnnnooccccnnoncncnnonncnnnnnnnnononononnnnnnnnnnonnn nro nnnnnnnnnnnns 113 WebBase User s Guide lt Table of Contents Chapter 9 Variables 115 OL Field Variables acota 116 9 2 Local Variables t sex cds atid ai lee haa 118 Local Input Variables eneee ee ee e ea ee aeae aaee A e E a a dad 118 Set Local Variables ion aii 120 Header Eocal Variables misereri a a E EE e E EEE E a aA 121 Cookie Local Variables nonnii sunnin dd 121 Creatina Cookies Eese NN 122 Receiving Cookies dto dos 123 WebBasclD Variables il idad aS A AAA TEE A A 123 9 3 Global Variabl sisi nornen r e era Eat 124 Editing Global Variables dys 205 26022 e oriasi ie a an ae tan aea Aa are Dese Eaa Aee E Dosis Ea di ita 125 94 Dynamic Variables od dali EE KEE Ena reap E Rn ass 126 Operational Variables iii a a a r E Siah 147 Special Vartables tt E EEE T SEEE E E EE E SE A 148 9 5 Displayins Variables sennae is 155 Chapter 10 User Variables 158 10 1 User Variables cd abs costae ile saute Pos eea oai eaea
207. cely indent and format the macros within the htf files Arguments are passed into the CALLed routine by specifying them on the lines between the call call using the format argl value arg2 WebBase variable value Note that only one argument can be specified on each line The argument name is the line up to the sign less any starting or trailing spaces and the value is the rest of the line also less any starting or trailing spaces WebBase variables may be used in this argument area and will be replaced with their values before the argument value pairing is performed It is important to understand this ordering of variable substitution followed by argument processing to insure correct handling of the arguments to be passed to the CALLed routine Since variable substitution occurs first any equal signs and newlines carriage return line feed sequences that might exist within a variable s value become relevant to the argument processing that follows Examine the following example Example 8 2 Variable Substitution 1 set temp argl 1 arg2 2 call forml htf output false temp call Since variable substitution will occur before the arguments are processed and the variable temp was set to a string that contained both signs and newlines the above is identical to Example 8 3 Variable Substitution 2 call forml htf output false argl 1 arg2 2 call Embedded signs and
208. cesceessaeeesaeecsaeecseecesaeeesaeessaeecseessneeeesaeeesaeessaeeseeeeses 28 3 8 Installing WebBase as a Windows NT Service ecceesesescecssceeesceeesseecsscecscecsaeeesaeecsaeecseeesneeeesaeeseaeers 31 T stallation as A SEV ii A Ad A a daa 32 WebBase as a Service and ODBC Configuration cccooccnoncncnncnnonenononnnonnnonananonnnnconnncnonnnrannnrnn ano nnnnccnnccrinnss 32 Starting the Service icici ciel ase iets Ea E ieee ieee ele nla ead 32 Stopping the Serve issssce 4stesestelaatelioussSescctsntes ious Tel aonazeasanedadehesieadasqnaag dees bagauaansaascesasgsauascenaaereaysseuscataet 32 Removing the Service Entry iii A A sai 33 Upgradins to Windows NT ceiiiec ieceres ioon ei alicia aora ici isbn 33 3 9 WebBase SUpport ceceno oseere en eE EE EOE E EEE 34 WebBase User s Guide iii Table of Contents Chapter 4 Initialization 35 A RN 35 Windows NT Serv ee Pa AE ETS r aaa a aa OS Ea AE tones ETE ERE EARE 38 Editing WebBase Parameters conan aii ais 38 A Sapna e aa a a a A A A a RA e RO N TRR 39 Editing Extensions senenn E E ad EET 41 ASAS A IA AAA E EEE RE E E E E 42 Editing Aliases met e a EA ter cta te a td pelo o A e A ica 42 4 4 Multiple Domains rial ms Nee tah ns deed dove sidad lso EEUE EES sabed bles fos leed bio sii ida 43 Creating and Editing Multiple Domains 000 ee eeeeeeseecsscceescecesseeceseecsacecseecesaeeesaeecsaeecsseeceseeeesaeessaeees 44 Chapter 5 WebBase Windows 47 5 1 Late Breaking News Window
209. cifying the filename As with most arguments path can be a constant variable or expression The optional keyword value pairs for the call macro are shown in the table below return String The names of local variables that are to be SET with the return values from the CALLed command The names are separated by spaces e g return valuel val2 finalVal The CALLed command will use a return vall val2 val3 macro or exit vall val2 val3 macro to specify what is to be returned The callee returns n items in positional order the caller specifies m variables in positional order WebBase places the returned values into the specified variables from left to right until whichever list runs out first both should be the same length wait Boolean If true default a synchronous call will be done and WebBase will wait for the return If false the return and output arguments are meaningless and ignored If the CALLed form generates output it would 84 WebBase User s Guide normally be accumulated into the stream being created and returned to the requesting browser If true default the calling form inserts any such output from the CALLed form at the point of the call macro If false the output is not inserted This is desirable where the CALLed form is used to compute something and return results in variables and not in stream to browser output This eliminates many blank lines generated by the newlines tabs and spaces used to ni
210. cluded If this option is turned off mail log files will not be generated Note that it is possible to have mail log files but not WebBase log files or vice versa It is suggested that you specify the LogDirectory parameter and then turn logging on or off either dynamically via this menu item or by setting the mailLogEnabled variable If mail logging is on a check mark is displayed next to this item Figure 16 8 Mail Log Enable Disable Dialogs Please Confirm Please Confirm Fey Clicking Yes wil Clicking Yes wilt 2 stop logging mail transactions and 2 open a mail log file and 16 3 close the current mail log file start logging mail transactions Stop logging mail Transactions Start logging mail Transactions al J m e Flush Mail Log File Information to be written into the mail log file is buffered until sufficient data has been obtained at which point it is written to the mail log file on disk If this option is selected any information in the buffer is written to disk This ensures that the information the user views in the mail log file is all that has been generated WebBase Macros A special macro has been provided with WebBase E Merge to allow one to conveniently send mail directly from a WebBase htf form WebBase User s Guide 289 Chapter 16 E Merge 290 mail lt args gt mail The mail macro allows the user to send mail from a WebBase htf form Keywords in the mail macro specify informa
211. company in Chicago WebBase is something I can pull out of a box and install myself Besides our Web has to be fast and maintainable InfoWorld July 17 1995 WebBase is a Web database server that allows you to easily integrate information from Open Database Connectivity ODBC databases into your Web site It works in cooperation with any browser allowing users to hypersearch a database as easily as they navigate hypertext links in a Web document With WebBase if it s contained in a database you can display it on a Web page WebBase provides solutions ranging from simple access to a real estate listing to a complex catalog ordering application You can make the contents of your database available to anyone browsing your site or limit access to a specific audience that you control through password protection In addition you can make existing databases more powerful by adding hypertext links into reports This feature allows users to delve into a report in greater detail while maintaining the simplicity of a high level view 1 1 WebBase Features and Benefits WebBase provides many features for the design and maintenance of Web forms New features are also added to each new release of WebBase to improve its functionality WebBase users often suggest these new features The following list identifies some of the interesting features offered by WebBase and how you can benefit from using WebBase WebBase is a full web server WebBase
212. concatenate them with the string at the appropriate place s For example set strBuf my output leftBrace asString will set the variable strBuf to my output NOTE The operations asFloat asInteger and asNumber return a numerical value if the argument is a string that is not a representation of a number the value returned will be 0 0 0 or O respectively Note that preceding or trailing blanks will cause what otherwise might appear as a number to be treated as non numeric and a 0 or 0 0 will be returned trimBlanks can be used to remove any leading or trailing blanks Use containsNumber or containsInteger to test a string before conversion if it might NOT be a representation of a number and the resultant value of O would cause problems with your logic lt e g f Goodbye Hello lt gt false returns true if the receiver is less than the argument using a case insensitive string comparison otherwise false lt e g f Goodbye Hello lt gt false returns true if the receiver is less than or equal to the argument using a case insensitive string comparison otherwise false gt e g f Goodbye Hello gt true returns true if the receiver is greater than the argument using a case insensitive string comparison otherwise false gt e g f Goodbye Hello gt gt true returns true if the receiver is greater than or equal to the argument using a case insensitive string comparison otherw
213. copy of the receiver with the enclosing double quotes removed If the receiver is not enclosed in double quotes returns the receiver symbolConstant e g f foo symbolConstant gt foo returns a symbol from the string if and only if the first character was a otherwise returns nil trimBlanks e g f Hi There trimBlanks gt Hi There returns a new string with the leading and trailing blanks spaces of the receiver removed Note that any embedded blanks are not removed upTo e g f l Hello upTo gt He returns a copy of the receiver up to the specified character withCrs returns the receiver after all occurrences of the backslash character 1 have been replaced with a carriage return This is effective when displayed within a lt PRE gt construct where the browser honors carriage returns For example the statement lt PRE gt f OnePer Line withCrs lt PRE gt will generate One Per Line zapCrs returns a copy of the receiver with all carriage return characters removed String Class Operations The string class is accessed using the WebBase variable String The operations in this section can be performed on this variable as can any of the operations described above for general collection classes PAE fromArrayOfSubstrings separatedBy e g set cltn one two three parseAt f clin String fromArrayOfSubstrings separatedBy gt one two three returns a new string by a
214. ction reports an error e reset e g f strm reset gt a FileStream on default htf returns the receiver after positioning it to the beginning e reverseContents e g f strm reverseContents gt lt see below gt returns a collection of the same type of the receiver s collection with the contents in reverse order The contents of the example file in reverse order are 2tceriDer sdnoces won XINUemanhtap emaneliFdneppa Sesab fth draziW 2tceriDer devreseR sthgiR 11A cnI ecnegilleTrepxE 7991 O jeslaf Stuptuos tes e setToEnd e g f strm setToEnd gt a FileStream on default htf returns the receiver after setting its position to the end e size e g f strm size gt 184 returns the number of objects in the receiver stream e skip e g f 10 strm skip gt a FileStream on default htf returns the receiver after incrementing its position by the argument e skipSeparators e g f strm skipSeparators gt a FileStream on default htf skip over any separators e skipTo e g f r strm skipTo gt true returns true if the argument is found otherwise false If the argument is found the position of the receiver is advanced to it If the argument is not found the position is put at the end of the stream e skipToWhitespace e g f strm skipToWhitespace gt true advance the receiver s position beyond the next occurrence of whitespace or if none to the end of th
215. d no connections will be in the cache so it is not necessary to clear them It is strongly recommended that ODBC connection caching be used Each sql macro request specifies a source name user name and password An ODBC database connection is made using the source name and user name If cacheODBC is true the connection is cached If a subsequent sq macro specifies the same source name and username the connection in the cache is used and a new connection is not created This can significantly reduce the amount of time it takes WebBase to process a request for the second and subsequent reference to the same source and username See Chapter 12 for more information on ODBC caching Clearing the ODBC cache will break any locks that WebBase has on ODBC databases Releasing these locks is necessary to perform database maintenance See Chapter 14 for more information on database maintenance Clear ODBC Cache Confirmation Dialog Please Confirm C Clearing the ODBC Cache will immediately remove 2 all ODBC connections without altering the status of the ODBC caching state as set via the Options menu Clear ODBC Cache Exit If this option is selected the confirmation dialog shown in Fig 5 10 below is displayed This dialog is also displayed if the user selects the close option from the window bar If so confirmed all WebBase windows are closed and WebBase processes stopped Figure 5 10 WebBase Exit Confirmation Dialog Please Confirm
216. d 26 Mar 1997 08 24 07 0 0 0 0 0 0 0 0 Start Log Wed 26 Mar 1997 08 24 08 0 0 0 0 0 0 0 0 Pause Server gt paused Wed 26 Mar 1997 08 24 08 0 0 0 0 0 0 0 0 Pause Server gt active Wed 26 Mar 1997 08 24 36 127 0 0 27 0 0 1 GET wbwizard HTTP 1 0 Wed 26 Mar 1997 08 24 36 127 0 0 27 0 0 1 GET wbwizard Wizard htf now 30276 HTTP 1 0 Wed 26 Mar 1997 08 24 39 127 0 0 27 0 0 1 GET wbwizard BasicEx now 30277 HTTP 1 0 Wed 26 Mar 1997 08 24 40 127 0 0 27 0 0 1 GET wowizard basicex Wbexams htf now 30279 HTTP 1 0 Wed 26 Mar 1997 08 24 42 127 0 0 27 0 0 1 GET wowizard basicex WBexaml HTF now 302802508 useBACKbutton XX doUSEit HTTP 1 0 Wed 26 Mar 1997 08 24 43 127 0 0 27 0 0 1 GET wowizard basicex WBexams htf now 30282450 HTTP 1 0 Wed 26 Mar 1997 08 24 45 127 0 0 27 0 0 1 GET wowizard basicex WBexam2 HTF now 30283820 useBACKbutton XX doUSEit HTTP 1 0 Wed 26 Mar 1997 08 24 47 127 0 0 27 0 0 1 GET wowizard basicex WBexams htf now 30285420 HTTP 1 0 Wed 26 Mar 1997 08 24 57 0 0 0 0 0 0 0 0 Pause Server gt paused Wed 26 Mar 1997 08 24 58 0 0 0 0 0 0 0 0 Quitting Wed 26 Mar 1997 08 24 58 0 0 0 0 0 0 0 0 Stop Log There are four pieces of information displayed on each line date the date and time of the request The format is XXX MMM DD YYYY HH MM SS server the server s IP number For general server entries e g Start_Log Quitting Stop_Log this va
217. d argument which is an ordered list The receiver is parsed using the parse characters found in the first argument which is a string The result s are appended to the collection in the second argument If the receiver does not contain any of the parse characters returns the second argument e passEncode e g f myUsername myPassword passEncode gt mR UR Q H c m returns a new string containing an encoded password based on the receiver initial password and argument user name e pathnameDOS e g f dirl subdirl myfile txt pathnameDOS gt dir1 subdirINnyfile txt returns a new string in which all the characters in the receiver have been converted to Y e pathnameUNIX e g f dirl subdirINnyfile txt pathname UNIX gt dirl subdirl myfile txt returns a new string in which all the V characters in the receiver have been converted to e quote e g f String quote gt String returns a new string in which a single quote mark has been added to the beginning and end of the receiver For example suppose you want to use a string value in an SQL statement SELECT FROM Table WHERE name varname sql true If one were to construct the SELECT statement dynamically one would need to surround the varname value with single quotes as well as process any enclosed single quote marks The following statement accomplishes both of these requirements WebBase User s Guide 193
218. d be 456 789 0 which is probably not what was intended indexOfString e g f ello Hello indexOfString gt 2 returns an integer defining the starting position of the argument within the receiver If the receiver does not contain the argument returns O indexOfString startingAt e g f ello 4 Mello Yellow indexOfString startingAt gt 8 returns an integer representing the starting position of the substring first argument found after the starting index second argument within the receiver If the substring is not found returns 0 isValidDirectory e g f cMITTPAWbwizardN isValidDirectory gt true returns true if the string represents the pathname of a directory that exists on the host system otherwise false isValidFile e g f c HTTP Wbwizard default htf isValidFile true returns true if the string represents the pathname of a file that exists on the host system otherwise false isValidIPaddr e g f 1 2 5 4 isValidIPaddr gt true returns true if the string represents an IP address of the form where each component is a numeric value that is less than 256 nonempty e g f Hello nonempty Hello f nonempty gt nbsp if the receiver is empty returns the non breaking space sequence If the receiver is not empty returns the receiver WebBase User s Guide e onlyDigits e g f l and 2 and 3 onlyDigits gt 123 returns a new string cont
219. d for HTML identifying all the options as read from the specified field within the database and which particular option is currently selected at e g f 2 clml at gt two returns the item at the specified index at put e g f 2 middle cltn1 at put clin1 gt OrderedCollection one middle three returns the second argument after replacing the element in the receiver at the specified index first argument with the new value second argument before e g f two cltnl before gt one returns the element that immediately precedes the argument in the receiver If the argument is not found in the receiver an error is reported descending e g f cltn descending gt SortedCollection two three one returns a SortedCollection containing all the elements of the receiver in descending order WebBase User s Guide Example 11 5 describe VHTMLTable e g sql to answers SELECT sql f answers describe VHTMLTable gt lt see below gt returns a string that displays a lt TABLE gt for each entry in the collection The table shows the field name field size field type and value within the field The example below shows a single record from the cars database provided with the WebBase WebWizard examples describe VHTMLT able example field width type value ID 11 INTEGER 26 Yer 6 SMALLINT 92 Maker 15 VARC
220. d for trouble shooting If your server is not responding properly you might try this option first to see if the problem is resolved Figure 5 5 Close All Connections Confirmation Dialog Please Confirm close all commands in progress and close 2 Closing All Connections will immediately the associated communications sockets Close All Connections e Clear All Caches If this option is selected the confirmation dialog shown in Fig 5 6 is displayed If the user confirms that the forms and ODBC connection caches should be closed the caches are emptied without altering the status of the caching state as set via the Options Menu This is equivalent to selecting both the Clear Forms Cache and Clear ODBC Cache menu options Figure 5 6 Clear All Caches Confirmation Dialog Please Confirm forms and ODBC caches without altering the status Q Clearing All Caches will immediately empty the of the caching state as set via the Options menu Clear All Caches e Remove All User Variables If there are no user variables currently defined an information window is presented indicating that no action is necessary If this option is selected and there is at least one user variable dictionary the confirmation dialog shown in Fig 5 7 is displayed The total number of user variable dictionaries is specified as part of WebBase User s Guide 51 Chapter 5 WebBase Windows Figure 5 7 the dialog If the user confirms tha
221. d using the WebBase server window menu options It is strongly recommended that logging be enabled and then only temporarily disabled if necessary Many Web analysis tools can use the log information See the section on Logging in Chapter 12 for more information Special Variables The variables described in this section do not exist unless specified by the user There is a default value associated with each of them but it is not possible to query for or use this default value Any of these special variables unless otherwise specified can be created as a global user or local variable to override the default value directory Browse This variable controls whether directory browsing is supported By default WebBase does not support directory browsing To enable directory browsing a global variable must be created with a value of true It is not possible to enable directory browsing with a user or local variable disableA lIInternalCommands If set to true all built in internal commands are disabled If this variable is created as a global variable a user would not be able to send the dateTime command to the server Instead the 404 file not found error would be returned dump VariablesOnError By default WebBase acts as if this variable were set to false When set to true the system will dump the local header cookie and user variables plus a list of available ODBC sources and drivers to the browser whenever an error
222. d will cause WebBase to branch to the onError clause All statements within the onError clause will then be processed If there is no onError clause the default error message will be suppressed and no information will be returned to the browser Example 8 11 errorProtect Macro errorProtect SGL ce SELECT WHERE sql onError lt H2 gt Sorry database not available Please try later lt H2 gt errorProtect A common usage for the errorProtect macro is around sql sql blocks as shown above If the sq macro and SELECT statement generate an error the onError clause returns a message to the effect that the database is temporarily down for maintenance please try again later This allows you to perform maintenance on the database without having to shut down your WebBase server which might also be interacting with other databases that are still accessible To insure you are not masking errors that should not be occurring you can have the actual error message you masked logged to a database to be analyzed off line Within the onError clause f error messageText will provide the error message that would have been sent to the browser had the errorProtect macro not been used NOTE The errorProtect macro will not catch programming errors such as leaving off the ending macro keyword e g if or using a parenthesis instead of a curly brace The macro is designed to capture user e
223. d you use one either timeFromString12 or timeFromString24 e timeFromString12 e g f 8 00 00 PM dateTime timeFromString12 gt 03 19 97 20 00 00 returns a new Universal time in which the time is as specified in the input string The date is the same as the date in the receiver The time string MUST be in 12 hour format with AM or PM regardless of the format of the system clock e timeFromString24 e g f 20 00 00 PM dateTime timeFromString24 gt 03 19 97 20 00 00 returns a new Universal time in which the time is as specified in the input string The date is the same as the date in the receiver The time string MUST be in 24 hour format regardless of the format of the system clock e year e g f dateTime year gt 1997 returns an integer specifying the year This is equivalent to f dateTime date year e zoneName e g f dateTime zoneName gt PST returns the time zone name of the receiver WebBase User s Guide 221 Chapter 11 Expressions Universal Time Class Operations The value of the UniversalTime WebBase variable is the UniversalTime class which can perform any of the following operations e gmt e g f UniversalTime gmt 03 19 97 19 23 17 returns a new universal time representing the current date and current time as GMT e now e g f UniversalTime now gt 03 19 97 11 23 17 returns a new universal time representing the current date and time 11 23 OdbcTimeStamp
224. dbcRowObject If the collection is a Dictionary the variable will contain an Association Finally if the collection is any other type of Collection the variable will be the entry in the collection The optional keyword value pairs for the forRow macro are shown in the table below String The name of the variable that contains the collection to be processed If the on argument is missing the variable results that contains the results from the last sq macro issued will be used The starting element within the list of results specified by the on argument it defaults to 1 max Integer The number of iterations of the loop to be processed it defaults to infinite which means that all rows will be processed ee Literal value only Used in conjunction with the escape macro to exit the macro asc desc Specifies whether the collection is sorted in ascending reverse or describing order or processed in reverse order Only the specified strings whether stored as constants variables or expressions are valid counter String The name of the variable that will hold the integer representing the number of the current row being processed If not specified the variable rowCounter holds the current row number Note that this row number is merely the sequential number of rows that have been processed it is not WebBase User s Guide 93 Chapter 8 Macros data that is actually stored as part of the database record
225. dd beforeIndex e g f end 2 cltnl add beforelndex cltnl gt OrderedCollection one end two three returns the first argument after adding it to the receiver at the index position immediately before the second argument e addAll e g set cltn2 four five six parseAt asOrderedCollection f cltn2 cltnl addAll clin1 gt OrderedCollection one two three four five six returns the argument after all of the elements in it have been added to the receiver e addAllFirst e g set cltn2 four five six parseAt asOrderedCollection f cltn2 cltnl addAllFirst cltnl gt OrderedCollection four five six one two three returns the argument after all of the elements in it have been added to the receiver prior to the first element in the receiver WebBase User s Guide 197 Chapter 11 Expressions 198 addAllLast e g set cltn2 four five six parseAt asOrderedCollection f cltn2 cltn addAllLast cltn1 gt OrderedCollection one two three four five six returns the argument after all of the elements in it have been added to the receiver after the last element in the receiver This is equivalent to addAll addFirst e g f end cltnl addFirst cltnl gt OrderedCollection end one two three returns the argument after adding it to the start of the receiver addLast e g f end clinI addLas
226. dding an HTML tag You can even preview the page you re developing in WebBase within the browser preview capabilities of WebberActive There are many other commercial HTML editing packages available each offers its own level of customization capabilities Several of the HTML packages are based on the SGML specification and can have problems handling WebBase htf files due to the use of curly braces by WebBase macros and variables Although it is possible to place WebBase expressions with the lt SCRIPT gt tag this can seriously limit the extent of WebBase functionality that can be added into a form Although it is not required that WebBase forms be developed with WebberActive we have found that the capabilities provided within WebberActive make it the optimum environment for developing and testing WebBase forms Note When a new htf file is created the name of the file must contain only alphanumeric characters Although operating systems such as Windows NT and Windows 95 support filenames containing spaces WebBase and browsers do not support htf 1a WebberActive is a 32 bit application and is included with the purchase of WebBase effective with build 55 Users who purchased WebBase prior to build 55 may purchased WebberActive by contacting sales expertelligence com WebBase User s Guide 79 Chapter 7 htf Files filenames containing spaces This also applies to directories It is not possible to create a URL that includes a
227. ded by the argument The argument can be a number or another point If it is a point the x coordinates are divided and the y coordinates are divided If it is a number the x coordinate and y coordinate of the receiver are both divided by the value e Meg f point point2 gt 1 1 returns a new point which is the integer remainder of the receiver divided by the argument The argument can be a number or another point If it is a point the x coordinates are divided and the y coordinates are divided If it is a number the x coordinate and y coordinate of the receiver are both divided by the value e eg f pointl point2 gt 7 11 returns a new point which is the sum or the receiver and the argument The argument can be a number or another point If it is a point the x coordinates are added and the y coordinates are added If it is a number the value is added to both the x coordinate and y coordinate of the receiver e lt eg f pointl point2 lt gt false returns true if the x and y coordinates of the receiver are less than the x and y coordinates of the argument respectively otherwise answer false e lt e g f pointl point2 lt gt false returns true if the x and y coordinates of the receiver are less than or equal to the x and y coordinates of the argument respectively otherwise answer false e eg f pointl point2 gt false returns true if the x and y coordinates of the receiver are equal to the x
228. der variables active in WebBase This dictionary should be used for information only See also headerVariablesHTML e Q headerVariableeHTML e g see below formats the header variables and their values for a nice printout on the browser as shown below Header variables are also considered local variables This display allows the user 136 WebBase User s Guide to see specifically which local variables came from header information See also headerVariables Example 9 22 headerVariablesHTML display Header Variables 4 e Accept image gif image x xbitmap image jpeg image pjpeg x e Connection e Host 127 e User Agent Keep Alive 01 Mozilla 3 0 Win95 1 I oll e host e g myComputer myCompany com returns the host name of the server as set up in the TCP IP network configuration e 9 inputVariables e g Dictionary arg2 gt abc now gt 32254 a dictionary containing any arguments which were passed into the form on the command line Command line arguments are another way to create local variables as described at the start of this chapter This display allows the user to see specifically which local variables came from command line arguments See also inputVariablesHTML e inputVariableeHTML e g see below formats the command line arguments and their values for a nice printout on the browser as shown below Command line arguments are another way to create local variables as d
229. des information on the system supplied extensions as well as how to override or set up additional extensions Both system supplied and user defined extensions are included in this display Example 9 10 defaultExtensionsHTML display Default Extensions 82 e a MimeUnknown text html true e a MimeError 404 true e abs a MimeReturn abs audio x mpeg true e ai a MimeReturn ai application postscript true e xwd a MimeReturn xwd image x xwindowdump true z a MimeReturn z application x compress true e zip a MimeReturn zip application x zip compressed true e SedomainDirectory e g c ittp identifies the root directory for the IP address specified in the command If multiple domains are in effect each different domain can have a different root directory where files are located It is not required that each domain has a different root directory If the particular IP address maps to a domain but there is no root directory specified for the domain then the default root domain is used If multiple domains are not being used this 1s the root directory as specified in the System Registry under Parameters Chapter 4 includes information on multiple domains e 9 domainExtensionsHTML e g see below formats all the extensions for the IP address specified in the command for a nice printout on the browser as shown below If multiple domains are in effect each different domain can have a diffe
230. determine this information by asking the size of the to variable timer id lt idVal gt lt args gt timer The timer macro is used to schedule entries on the WebBase timer queue WebBase checks this queue once every minute and when an entry s time has expired the entry is processed The lt args gt provide for scheduling the entry that can be for a one time execution or for a repeated periodic execution The entry that is scheduled is all the text contained within the timer timer construct as well as a copy of all variables defined at the time the entry is scheduled This text will generally consist of WebBase macros and expressions that will be interpreted at the time the entry is executed Since the timer queue entry will be executed at some point in the future it will not be associated with the browser that executed the form that originally scheduled the entry If the entry references variables associated with such a browser e g browserAddress Accept Content length unpredictable results can occur Output generated by the timer queue entry does not get sent to a browser as does output generated by standard WebBase forms However output to files using any of the WebBase file access mechanisms and output to a database via the sql macro will be properly processed The id keyword is also required as is its value which is either an integer or string which is used to identify this entry in a remove from timer que
231. dicates the number of lines of information that will be displayed within the window as well as how often the commands will be sent out Figure 5 22 WebBase Heartbeat Window ES webBase 56 Heartbeat 100 lines OF x File Edit Status 6 lt gt 8 id 14398769 received 14398769 gt 8 id 14398769 sending 8 id 14398765 received 14398765 8 id 14398765 sending ervice active as of Fri 14 Mar 1997 15 07 32 ervice active as of Fri 14 Mar 1997 15 07 32 The WebBase parameter HostAddress can be used to specify the IP address where the heartbeat command is to be sent If the parameter is not defined it defaults to 127 0 0 1 that should work in most systems to identify the local host If the user sets a parameter that is a different and possibly remote WebBase server the heartbeat commands will be sent to this server However if a reply time out occurs the TCP IP restart command will be sent to the local server running the Heartbeat service WebBase Heartbeat Window Menu Bar The following menu options are available on the WebBase Heartbeat Window File gt Exit If this option is selected the WebBase Heartbeat Window is closed Closing this window has no effect on other WebBase functions However the heartbeat is only functional when this window is open If the window is closed the heartbeat will be stopped Edit gt Cut this menu option provides the same functionality as described for the WebBase Transactions
232. displayed If this option is selected one of the confirmations shown in Fig 5 12 is displayed The dialog on the left is displayed if caching is currently enabled the dialog on the right is displayed if caching is currently disabled If caching is enabled any form that is referenced is read from the file system the text is parsed and the resulting WebBase User s Guide information is added to the cache The advantage of using forms caching is that WebBase will not have to hit the disk to read the form each time it is accessed and will not have to parse the text in the file If the form is subsequently referenced it will be retrieved from the cache This substantially reduces the amount of time it takes WebBase to process a request for the second and subsequent reference to the same Web page If this option is turned off all output forms will be acquired from the file system even if they are in the cache If this option is disabled the Enable Cache TimeCheck option is also disabled If a change to caching is made using this menu option it will stay in effect until WebBase is stopped The variable cacheEnabled should be set to make any persistent change to whether forms caching will be used Figure 5 12 Enable Cache Read Confirmation Dialogs Please Confirm gt Disabling Cache Read will B cause all output forms to be acquired from the file system even if they are in the cache Disable Cache Read Jo w i Please Confir
233. displayed in the Late Breaking News window These error messages may relate to attempting to access the server at ExperTelligence for news to display or they may relate to a configuration problem on your system Be sure to review this window for any possible error messages To quit WebBase use the Exit command in the WebServer menu of the WebBase Server window You will be prompted to confirm that you want to exit WebBase If so confirmed WebBase will terminate The Late Breaking News window will automatically be closed when you quit WebBase Possible Installation Problems Many errors caused by improper installation will cause an error message to be generated and written to the file specified in the errorLogFile parameter and also echoed in the Late Breaking News window as shown below Starting WebBase 4 10 Build 56 Server ERROR lt error message text gt SERVER DID NOT START SUCCESSFULLY It is very important that you review the information presented in your Late Breaking News window to diagnose any installation problems that may have occurred Below are some possible installation problems If you have a problem testing your WebBase installation check the following list of symptoms to see if you can identify and correct the problem e Symptom The launch executes as described above but no WebBase Server window appears The Late Breaking News window and error log file specified in th
234. dn34e9dkLkdj6 might yield an authDecode string of the form Joe User password authUserName would return Joe User and authPassword would return password A complimentary authEncode method exists that when sent to a string such as Joe User password would return the string Basic GdkLkkdn34e9dkL kdj6 The storage and maintenance of the user ids and passwords used for Basic Authentication is entirely at the discretion of each user It is recommended that a database be created with at least two fields one for the username and one for the password Using an appropriate SELECT statement the database is queried using the username and password entered by the user If a match is found access is granted If no match is found access is denied There is a caveat that needs to be stressed when using Basic Authentication Once a browser has performed Basic Authentication the browser will continue to send authentication information to the server with each request until the browser is stopped It is not possible to clear out the authentication information so that a user can be authenticated differently within another portion of a database Although it is possible for a user to create their own user authentication form an advantage of using Basic Authentication is that the username and password entered by the user are sent in an encrypted format to the server WebBase does not currently support any other mechanism for having information generated at
235. ds will be selected and returned The is the wildcard character and indicates that all the fields in each record are to be returned The FROM specifies which table the data will be retrieved from and is followed by the name of the table It is possible to retrieve only some of the fields for each record To retrieve only the ID Year and Maker of the records the following statement would be used 72 WebBase User s Guide WebBase User s Guide 73 SELECT 1D Year Maker FROM Cars It is strongly recommended that only the necessary fields of data be retrieved via a SELECT statement This reduces the amount of data to be retrieved from the database and returned to WebBase via the ODBC driver resulting in an improvement in performance Often it is necessary to retrieve a set of records based on their contents These qualifications are added to the SELECT status using a WHERE clause In the example above we might want to retrieve all the cars that were 2 door The following example shows how this would be done SELECT FROM Cars WHERE Kind 2 door The WHERE clause contains three components the field name from the table a comparison operator and a value In this case the field name was Kind the operator was and the value was 2 door It is possible to specify several criteria in a single WHERE clause Continuing with the above example here s the select stateme
236. e exampleValue returns the value of the receiver if a default value has been set otherwise returns an empty string e value e g set assoc exampleKey exampleValue Association key value f assoc regDB add f newExampleValue SOFTWARE ExperTelligence Inc WebBase 4 10 Parameters exampleKey RegistrationDatabase localMachine at value gt aRegistrationDatabase returns the receiver after settings its value to the argument e values e g f SOFTWARE ExperTelligence Inc WebBase 4 10 RegistrationDatabase localMachine at values gt OrderedCollection returns a collection of the values corresponding to all the keys of the receiver If no default value is specified for a key returns an empty string in the appropriate location within the collection DE A EF Registration Database Class Operations The RegistrationDatabase variable represents the RegistrationDatabase class The following operations can be sent to this class e classesRoot e g f RegistrationDatabase classesRoot gt aRegistrationDatabase returns a new instance of the receiver corresponding to the HKEY_CLASSES_ ROOT WebBase User s Guide 241 Chapter 11 Expressions predefined key The keyName for top level registration databases is a number e g 2147483652 that uniquely identifies this top level RegistrationDatabase copyFrom in to in e g f SOFTWARE Company currentUser SOFTWARE Compa
237. e portion displayed according to the picture string The time portion will be formatted as in the asDateTime24 method See Date printWithPicture for the formatting details e asDateWithPicture e g f MMM dd yyyy otsVarl asDateWithPicture Mar 11 1997 returns a formatted string of the receiver s date displayed according to the picture string See also asDateTime WithPicture asDateTime12WithPicture and asDateTime24WithPicture See Date printWithPicture for the formatting details e asNonEmptyString e g f otsVarl asNonEmptyString 03 11 97 02 37 38 PM returns the receiver as a date time string This is equivalent to the asDateTime operation It is provided for compatibility with the asNonEmptyString operation on Strings e asSeconds e g f otsVarl asSeconds gt 3035543858 returns the number of seconds elapsed from January 1 1901 until the specified date plus the number of seconds in the time e asUniversalTime e g f otsVarl asUniversalTime gt 03 11 97 14 37 38 returns a new UniversalTime instance in which the date and time are set to those of the receiver e date e g f otsVarl date gt 03 11 97 returns the date portion of the receiver e dateAndTime e g f otsVarl dateAndTime 03 11 97 02 37 38 PM returns an array containing the date and the time represented by the receiver e fraction e g f otsVarl fraction gt 0 returns the fractional portion of th
238. e errorLogFile parameter will typically have an entry of the form Error Missing lt xxxx gt WebBase parameter s Possible Solution The indicated lt xxxx gt WebBase parameter entry is missing Review the information in Chapter 4 about required WebBase parameters Remember that parameter names are case sensitive e Symptom The launch executes as described above but the WebBase Server window is missing the Using port line and you are immediately presented with the dialog to exit You can also start WebBase by running the WebBase exe file However this is not the recommended approach On Windows NT 4 0 systems the file WebBase bat is used to start WebBase Attempting to start WebBase by double clicking on or executing the program WebBase exe will result in errors Itis strongly recommended that the WebBase icon be used to start the program as this icon references the appropriate file based on operating system type WebBase User s Guide 25 Chapter 3 Installation WebBase as shown in Fig 5 10 The error log file will have an entry of the form Error 10048 WSAEADDRINUSE The specified address is already in use Possible Solution1 WebBase has determined that the port that it is attempting to communicate on the PortNo parameter is already in use Assign a different unique port number to WebBase and attempt to launch the application again Possible Solution2 If you did not explicitly quit the application with the Exi
239. e following message is displayed at the browser 403 Browsing is not permitted in that directory 133 Firewalls The purpose of a firewall is to limit access to a network This is often done by limiting access to ports If multiple HTTP servers will be used and access to users outside the firewall is desired it is necessary for the site network administrator to modify the firewall to allow access WebBase User s Guide 265 Chapter 13 Security 266 to each port that is used by an HTTP server For example if WebBase is using port 8000 and Microsoft Internet Information System is using port 80 the firewall must be modified to allow access to port 80 and 8000 The Late Breaking News window shows information about new releases bug fixes and documentation updates available from ExperTelligence The information comes from a server at ExperTelligence If your WebBase server is behind a firewall you can allow WebBase to get through the firewall by adding the following parameters e HTTP_Proxy firewall proxy host name e HTTP_ProxyPort firewall proxy port number If these parameters are defined when you launch WebBase the query to get Late Breaking News passes through the indicated firewall WebBase User s Guide WebBase User s Guide 267 WEB Sz Database Issues Experiolligence Chapter 14 14 1 268 This chapter presents information about database and ODBC issues It also includes sections on specific databases that have
240. e printWithPicture for the formatting details See also asDateTimewithPicture asDatewithPicture asDateTime24 e g f dateTime asDateTime24 03 19 97 11 23 16 returns a string representing the date and time of the receiver in 24 hour format asDateTime24withPicture e g f MMM dd yyyy dateTime asDateTime24withPicture Mar 19 1997 11 23 16 returns a formatted string of the receiver s date and time with the date portion displayed according to the argument The time portion will be formatted as in the asDateTime24 method See Date printWithPicture for the formatting details See also asDateTimewithPicture asDatewithPicture asDatewithPicture e g f MMM dd yyyy dateTime asDatewithPicture gt Mar 19 1997 returns a formatted string of the receiver s date displayed according to the argument See Date printWithPicture for the formatting details asHeaderDateTime e g f dateTime asHeaderDateTime gt Wednesday 19 Mar 1997 11 23 16 GMT returns a string containing the receiver s date and time in a format acceptable for use in a header asLogFileTimeStamp e g f dateTime asLogFileTimeStamp gt 19 Mar 1997 11 23 16 0800 returns a string displaying the date and time in the format used in the log file records asMailDateTime e g f dateTime asMailDateTime gt Fri 19 Mar 1997 13 20 30 returns a string containing the receiver s date and time in
241. e a file reference without an extension Default value is htf htm in that order The License parameter specifies the value of your license number This parameter will be prompted for the first time the application starts unless it is provided here At the bottom of the window is a button labeled Don t Create INI File This button should be selected only during an upgrade so that your WebBase INI file will not be modified or if you want to manually edit this file to set up all the necessary parameters at a later date It is strongly recommended that the user allow the WebBase INI file to be created or updated during the installation process Since Windows 3 1 and Windows for Workgroups do not provide for time zone support you must provide WebBase some information about your time zone for it to effectively communicate with browsers which may be executing in a time zone different from yours The information entered in the dialog shown in Fig B 2 is being requested in a format compatible with that of Windows NT and Windows 95 Registry support for time zones Figure B 2 TimeZone Parameters Time Zone Support WebBase requires the following Time Zone items to be able to convert between system time and GMT for browser control Standard Bias is the number of minutes behind GMT standardBias ETT for CST standardBias 360 Daylight Bias is the number of minutes daylight savings time is behind the standard time dayli
242. e a mime type of text html but use WebBase processing so their mime type would be defined as text html WebBase User s Guide WebBase User s Guide 41 To indicate an extension type is to be ignored and that WebBase is to return the 404 File Not Found error message for such a file a mime type of 404 is specified If no extensions have been defined all the default extensions listed previously are used If the user wants to continue to use these system defaults but add or modify some additional file extensions a file extension of whose value is use all system defaults must be specified Tf the user creates one or more extensions but does not include the extension no default extensions will be used If the entry is found the default extensions are first loaded into the extensions dictionary and then the registry entries are processed If this entry is not found only the registry entries are processed An extension that has no associated mime type indicates that 1t is to be removed from the dictionary If the key 1s not found in the dictionary no error will result For example to ignore GIF files an extension of gif would be created with no value The extension is used to specify how any extension not found is to be treated By default this will return the 404 error for any extension not otherwise encoded in the dictionary If logging is enabled a log record is added for each
243. e a number of operations that can be sent directly to the command instance In general this is not encouraged as one can alter the contents of the command instance to the point where WebBase can no longer process it without generating an error There are however a few methods that can be useful in the development of htf forms that will be described here e argList e g f cmd argList gt httpcmd argl abc amp karg2 1 The full argument string including the command file name e argString e g f cmd argString gt argl abc amp arg2 1 Returns just the arguments part of the argList see above e asHTF e g f myWhere cmd asHTF gt WHERE clause The asHTF parses the contents of the variable first removing any surrounding htf htf macros and then evaluating the variable references contained within the string NOTE the asHTF message only processes variables it does not evaluate WebBase macros like the if case etc The characters immediately following the opening curly brace are taken to be a field or variable name and any parameters such as sql true will be handled as described in the documentation of WebBase variables The basic example 9 included with the WebBase WebWizard shows how the asHTF operation can be used e beep e g f cmd beep gt a HttpGetN causes a beep to sound Beeps the server e beep for e g f 3 50 cmd beep for gt a HttpGetN causes 3 beeps every 5
244. e and sent back to the browser Unlike other variables the value of the cookie specified by the user is combined with other data before being stored in its dictionary The cookie value and the current values of ZecookiePath YcookieDomain and YcookieExpires are all concatenated together and then the value is stored into the dictionary This allows the user to create some cookies that are transitory and others that are persistent all within the same form The example below shows how to set the value of cookieExpires to create a persistent cookie that will exist for approximately 2 years Chapter 9 includes additional information on cookie variables Cookie variables can be removed using the removeCookie macro Example 8 36 setCookie Macro set ScookieExpires 700 SUniversalTime S now addDays setCookie myCookieVar test Variable indirection is possible using cookie variables but should be used with caution The following example shows how indirection can be done Note that the setCookie macro is only the last macro used As noted above when a name value pair is entered into the cookies dictionary additional information is appended to the variable name Thus it is not possible to retrieve a value from the cookie dictionary for use in indirection Example 8 37 setCookie Macro and Multiple Variable Indirection set counter 3 set oldCounter counter setCookie newCounter oldCounter setGlobal lt var gt
245. e argument The argument must be in 12 hr AM PM format fromString24 e g f 15 30 00 Time fromString24 gt 03 30 00 PM returns a time for the value given by the argument The argument must be in 24 hr clock format hours minutes seconds e g f 11 29 00 Time hours minutes seconds gt 11 29 00 AM returns a time which represents the given number of hours first argument minutes second argument and seconds third argument after midnight of the current day millisecondClockValue e g f Time millisecondClockValue gt 34697800 returns the number of milliseconds from midnight of the current day to the current time now e g f Time now gt 09 38 17 AM returns a time representing the current time in seconds WebBase User s Guide totalSeconds e g f Time totalSeconds gt 34697 returns the number of seconds from midnight of the current day to the current time 11 22 Universal Times The dynamic variable dateTime returns the current date and time as a UniversalTime object Universal Time Instance Operations The following messages can be sent to any WebBase variable containing a UniversalTime Note that these messages also include those which can be sent to dates or times lt e g set dateTimel 2 10 97 odateTime dateFromString set dateTime2 2 11 97 YodateTime dateFromString f dateTimel dateTime2 lt gt false returns true if the receiver is less than the argument otherwis
246. e as APTOM E Das e subject an optional keyword this identifies the subject of the message It is a string that will be placed in the header of the message as Subjects ya Y BM e attach this keyword is optional and specifies attachments to be included with the mail message The value must be a constant variable or expression that evaluates to a string that can be parsed at space comma or semicolon into a collection of strings or a collection of strings Each string must be a fully qualified DOS pathname of a locally accessible file to be sent as an attachment e ce this keyword is optional and is the address or addresses of where copies of the mail message are to be sent The format of the cc value is the same as that of the to value It will appear in the header of the message as AEESA Poche N N e bce an optional keyword that is the address es of where copies of the mail message are to be sent that will not appear in the header of the message The format of the bec value is the same as that of the to value e reply an optional keyword that is the address to be included in the Reply To header field The format of the reply value is the same as that of the from value WebBase User s Guide e organization an optional keyword that is the name of the company or organization to be included in the Organization header field e id this is an arbitrary string you may provide to help identify the mail
247. e contents of the two collections concatenated together e e g set cltn2 four five size parseAt f cltn2 cltn1 gt false f xyz strl gt false returns true if the receiver and argument are equal otherwise false Each element within the receiver must exactly match the corresponding element within the argument For example if the arguments are strings the receiver and argument are compared using a case sensitive string comparison e asArray e g f cltnl asArray gt one two three f strl asArray gt a b c returns an array containing all the elements of the receiver e asOrderedCollection e g f cltnl asOrderedCollection gt OrderedCollection one two three f strl asOrderedCollection gt OrderedCollection a b c returns an ordered collection containing all the elements of the receiver e asSortedCollection e g f clin asSortedCollection gt SortedCollection one three two f strl asSortedCollection gt SortedCollection a b c returns a sorted collection containing all the elements of the receiver sorted in ascending order WebBase User s Guide 181 Chapter 11 Expressions 182 atAllPut e g f new cltnl atAllPut gt new new new f p strl atAllPut ppp returns the receiver after each element has been replaced with the value in the argument average e g f numClin
248. e false lt e g set dateTimel 2 10 97 odateTime dateFromString set dateTime2 2 11 97 YodateTime dateFromString f dateTimel dateTime2 lt gt false returns true if the receiver is less than or equal to the argument otherwise false e g set dateTimel 2 10 97 odateTime dateFromString set dateTime2 2 11 97 YodateTime dateFromString f dateTimel dateTime2 gt false returns true if the receiver and argument are the same date and time otherwise false gt e g set dateTimel 2 10 97 odateTime dateFromString set dateTime2 2 11 97 YodateTime dateFromString f dateTimel dateTime2 gt gt true returns true if the receiver is greater than the argument otherwise false gt e g set dateTimel 2 10 97 JodateTime dateFromString set dateTime2 2 11 97 YodateTime dateFromString f dateTimel dateTime2 gt gt true returns true if the receiver is greater than or equal to the argument otherwise false addDays e g f 4 dateTime addDays gt 03 23 97 11 23 16 returns a new UniversalTime with the indicated number of days added to the receiver Note that the number of days can be negative addSeconds e g f 360 dateTime addSeconds 03 19 97 11 29 16 returns a new UniversalTime with the indicated number of seconds added to the date and time of the receiver Note that the number of seconds can be negative asCookieDateTime e g f dateTime asCookieDateTime
249. e found as entered or not 3rd the error text if 1st is false comment call valid htf return okay yesorno message output false id UserId pass Password dbase FileOne call if okay not we received an error message in variable message do something then tell user file not found Serr404 exit if if yesorno lt P gt Okay you were found Now log the activity offline i e don t make the user wait for the sql call that does the logging to receive HTML output back at the browser call logger htf wait false id Userld trans Some log transaction message here dbase LogOne call else Serr404 not found in database if lt BODY gt lt HTML gt Chapter 8 Macros Example 8 6 The first called file valid htf comment We were called with three arguments as follows id the user s id pass the password the user entered dbase the ODBC source of the password database we are to use We will return three values as follows lst true if the database lookup was okay false if not 2nd true if the user id and password were found in the database and were acceptable false if not the error message if 1 above was fals Lie 3rd lookup the database was not successful comment errorProtect sql to valid source dbase SELECT PASSWORD FROM PASSTABLE WHERE USER ID id sql true sql onError
250. e g f myAccess fred test Databaselnfo tableSource user password gt OrderedCollection an OdbcRowObject returns an ordered collection containing OdbcRowObjects representing each table in the specified source This collection can be iterated through the using forRow macro to look at the information contained within each table including the fields table_name table_owner and table_qualifier This operation is useful to obtain information that is to be displayed within a lt TABLE gt construct as in the WebBase WebWizard ODBC Viewer utility WebBase User s Guide 249 Chapter 12 Features peo f LA ES yo Features Ng ExperTolligence Chapter 12 This chapter contains descriptions of the features of WebBase It is suggested that you occasionally check the WebBase Web site for new tips and techniques Valuable information can also be obtained on the WebBase Support Forum also accessible at the WebBase Web site 12 1 Logging 250 WebBase stores information about every command that it processes or returns unless logging has been disabled in general or for a particular file extension Logging can be enabled or disabled on the WebBase Server window by default 1t is enabled The log information is stored within files in the directory specified as the LogDirectory parameter If this parameter is not specified then logging cannot be enabled It is strongly recommended that t
251. e g f c msoffice access msaccess exe oFile execute gt File execute the file named in the argument a exe or pif file To run a batch file specify command com c xxx bat exists e g f c ittp wbwizard default htf File exists true returns true if the file or subdirectory specified by the string argument exists otherwise false exists in e g set fileDir cNMittp Directory pathName f example htf fileDir File exists in false returns true if the file or subdirectory specified by the string argument exists in the specified directory second argument otherwise false Note that the second argument must be a directory not a string identifying a directory fileName extension e g f aLongFilename aLongFileType File fileName extension gt aLngFlnm aLo returns a string which is a file name abbreviated from the first and second arguments Lowercase vowels are dropped from the right of the first argument until it is less than or equal to 8 characters fullPathName e g f webbase exe File fullPathName gt CAWEBBASE WebBase exe returns the full path name of the file name specified in the argument newFile e g f testFile dat File newFile gt a FileStream on testFile dat returns a file stream with path name specified by the argument WebBase User s Guide 225 Chapter 11 Expressions newFile in e g set fileDir cMttp Directory pathName f
252. e g ID EQN 123 gt ID 123 same as EQ but coerces the value to a number using asNumber e EQS e g ID EQS 123 gt ID 123 same as EQ but coerces the value to a string using asString and encloses the field in single quotes WebBase User s Guide GE e g ID GE 123 gt ID gt 123 adds the field to the WHERE clause using a greater than or equal operator GEN e g ID GEN 123 gt ID gt 123 same as GE but coerces the value to a number using asNumber GES e g ID GES 123 gt ID gt 123 same as GE but coerces the value to a string using asString and encloses the field in single quotes GT e g ID GT 123 gt ID gt 123 adds the field to the WHERE clause using a greater than operator GTN e g ID GTN 123 gt ID gt 123 same as GT but coerces the value to a number using asNumber GTS e g ID GTS 123 gt ID gt 123 same as GT but coerces the value to a string using asString and encloses the field in single quotes LE e g ID LE 123 gt ID lt 123 adds the field to the WHERE clause using a less than or equal operator LEN e g ID LEN 123 gt ID lt 123 same as LE but coerces the value to a number using asNumber LES e g ID LES 123 gt ID lt 123 same as LE but coerces the value to a string using asString and encloses the field in single quotes LIKE e g name LIKE George gt name LIKE George adds the field to the WHERE clause with a LIKE operator This is very similar
253. e keyword is false the handle is NOT kept following the SQL statement unless of course the handle is being cached in the ODBC connection cache Setting the keyword keepHandle to true indicates that the handle allocated for the ODBC connection to the Data Source is not to be freed following use In addition even if the ODBC cache is enabled the connection handle associated with this SQL statement will NOT be placed in the ODBC cache following use but will be disconnected but NOT freed This will ensure that this handle will not cause a GPF as a result of this SQL statement It will also ensure that a GPF will not be caused as a result of clearing the ODBC cache in the future either explicitly or as a result of the cleanup action taken when the server is shut down For this keepHandle keyword to be effective against the GPF problem it must be associated with the first ODBC connection made to the database For this reason the SQL statement containing this option must be executed before any other SQL statement can be executed Item 2 is accomplished through the specification of a startup form To ensure that the above SQL statement is executed before any other WebBase htf form is run that might contain an SQL statement a Startup Form is used The Startup Form is a htf form that WebBase will automatically run each time that the server is started and before it begins processing any browser commands WebBase User s Guide WebBase runs the Sta
254. e names of all the local variables received via the command line in the variable theArgs The form designer can use this variable to determine which local variables are a result of command line input The values of the variables are not included in theArgs just the names of the variables The dynamic variables inputVariables and inputV ariablesHTML can be used to determine display the local variables created from command line arguments as well as their values Each local variable created from a command line is automatically stored as a string value as indicated above An important responsibility for the forms designer is to know which local variables should be passed into a form via a command line and set up appropriate conversions of the data values if necessary In the example above the id should be a numeric value This should be set up in the form as set id id asNumber 16 3 dr A ian te a A A POST request passes the command line arguments to the receiving form in a similar fashion but the arguments are not displayed as part of the URL This is often desirable as it presents a cleaner interface to the user at the browser and it may also hide information that the user should not see WebBase User s Guide 119 Chapter 9 Variables 120 Another way to create command line arguments is to explicitly include them in the creation of anchors An example of an anchor using command line arguments is lt A HR
255. e new operation should be used to optimize performance e new e g f 25 OrderedCollection new gt OrderedCollection returns an empty ordered collection capable of holding the number of elements specified in the argument See the description of the new operation above for usage tips 11 13 Ordered Lists An ordered list is almost the same as an ordered collection All of the operations described for ordered collections apply to ordered lists There are no operations specific to ordered lists However an ordered list and a sorted list are the only WebBase data types that will return true to the isList operation The OrderedList WebBase variable can be used with the general collection and ordered collection class operations described above There are no class operations specific to the OrderedList class An ordered list can be created in WebBase by parsing a string see parseAt above or via the dynamic variable newList Typically one would assign a list to a variable then send messages to that variable to manipulate the contents of the list as appropriate for the application 11 14 Sorted Collections A sorted collection contains elements sorted according to the elements sort order which is how they respond to the lt method All of the operations that can be performed on ordered collections can also be performed on sorted collections However ordered collection operations which add a new element to a specific location wit
256. e operations that can be performed on them within WebBase expressions and examples of their use 11 1 WebBase Expression Components Each WebBase operation is performed on a receiver For example to determine how many characters are in a string the operation would be size and the receiver would be myString Some operations require arguments For each colon in the operation an argument must be provided For example to determine if a date is between two other dates the operation would be between and the receiver would be datel and the arguments would be date2 and date3 In RPN notation the receiver always immediately precedes the operation Any arguments will precede the receiver the arguments are in order left to right within the RPN statement Each operation returns some type of result In some cases a new instance is returned For example the result of adding 3 and 5 is 8 The receiver is 3 the operation is the argument is 5 and the result is 8 As another example when abc and xyz are concatenated together a new string abcxyz is returned In other operations the receiver is returned The receiver may or may not have been modified depending on the purpose of the operation For example f 2 3 BC abcdef replaceFrom to with returns the original string but it has now been modified to be aBCdef In some other operations a copy of the receiver is returned and the ori
257. e receiver either 0 or 1 e max e g f otsVarl otsVar2 max gt 03 12 97 11 23 35 AM O returns the greater of the receiver or the argument e min e g f otsVarl otsVar2 min gt 03 11 97 02 37 38 PM 0 returns the lesser of the receiver or the argument e time e g f otsVarl time gt 02 37 38 PM returns the time portion of the receiver WebBase User s Guide 223 Chapter 11 Expressions 11 24 Files 224 A file provides sequential or random access to the host file system Each read operation answers one page maximum 2k bytes of the file with the exception of the last page which may have fewer bytes The number of bytes to write may be from 1 to 2k bytes In general reading and writing of file information should be done using a file stream The specific file associated with a file stream can be obtained from the file stream File Instance Operations The following operations can be sent to any instance of a file For the examples below two file instances are used The first is called myFile1 and is opened on the file default htf that is provided with the WebBase WebWizard This instance is created using set fileDir cMittpwbwizarW Directory pathName set myFile default htf fileDir File open in The second instance is called myFile2 and is opened on a non existent file called fileExam htf This instance is created using set fileDir c Nittp wbwizard Directory pathName set myFile fileExam htf fil
258. e scans for the first occurrence of an ending print keyword WebBase does not support nested print blocks 310 WebBase User s Guide The example below would print lt TITLE gt systemName lt TITLE gt at the browser and NOT set the browser s title to the value of the variable systemName print convert lt TITLE gt systemName lt TITLE gt print D 2 Obsolete dynamic variables AOL a Boolean indicator of whether the calling browser is accessing the server through AOL If a user needs to present information for a specific type of browser it is recommended that the User A gent header variable be examined to determine the browser type debug Addresses returns the same value as serverAddress errorVariableNotFound By default if the user accesses a variable that has not been defined an error is generated and an error message is returned to the browser In most cases this is the desired action while the user is developing htf files There are some circumstances however when htf files must determine if a variable does exist and take appropriate action if it does not rather than returning an error message Setting this variable to false as shown above will suppress the error message and allow the user to query variables with an isNull or notNull message Several operations are available for the user to test to see if a variable is in existence Instead of using errorVariableNotFound the user sh
259. e server s Directory structure If the StartupForm parameter is not specified when WebBase is launched or if no file is found at the indicated location then the Startup Form will not be executed If StartupForm parameter 1s specified but the file cannot be found a message to that effect will be posted to the WebBase WebServer window The absence of the file will not cause processing to stop or any other error to be indicated Since each user will have their own ODBC Data Sources it is necessary for each user to provide an SQL statement that will connect to one of these sources using the new keepHandle keyword This allocates the connection handle in a way that will ensure it is not released following the ODBC call To insure this specific call is made each time WebBase is launched before any htf form containing an SQL statement addressing an Access database is processed the sql keepHandle true macro should be placed in a Startup Form as described above It is not necessary to make a specific type of SQL statement SELECT INSERT UPDATE or DELETE nor is it necessary to submit retrieve any data to from the database The most efficient way of utilizing this workaround is to specify a SELECT that will return no matches It is merely the act of connecting to and not releasing the connection handle after disconnecting from the database that circumvents the problem Below is a sample Startup Form used to solve this problem The referenced dat
260. e statements scope the local variable localVar still has a value of test setString lt var gt lt options gt setString The setString macro creates a variable containing a string the string value is specified on one or more statements within the setString setString keywords This macro provides an alternative to using the set or f macros with multiple concatenation operations it allows the user to see very clearly how text and variable values will be put together into the resulting variable var is any valid variable name The setString macro supports a number of options that determine the type of variable to be created as well as how the resulting string value will be handled Each of these options can be specified as a constant variable or parenthesized expression however they must resolve to a string of the specified option name The valid options are e collapse replaces all control characters and multiple spaces in the string within the setString setString with a single space character This reduces the string to the barest minimum for sending to the browser This is desirable as it eliminates extraneous whitespace when doing a view source at the client browser e trim replaces leading and trailing spaces and newlines but does not modify embedded formatting This is less severe than the collapse option above e local the resulting variable is stored a
261. e stream Return true if a whitespace occurred otherwise false e skipWhitespace e g f strm skipWhitespace gt aFileStream on default htf skip over any whitespace characters e upTo e g f t strm upTo gt se returns the collection of objects from the receiver starting with the next accessible object and up to but not including the argument Set the position beyond the argument If the argument is not present returns the remaining elements of the stream e upToWhitespace e g f strm upToWhitespace gt set returns the collection of objects from the receiver starting with the next accessible object and up to but not including the next whitespace character Set the position beyond the whitespace character If no whitespace character is present returns the remaining elements of the stream WebBase User s Guide 231 Chapter 11 Expressions Stream Class Operations The following methods can be sent to any type of stream class The stream classes that are available are ReadStream WriteStream and ReadWriteStream e crString e g f WriteStream crString gt lt CR gt lt LF gt characters returns a string containing a carriage return and line feed characters This is equivalent to the cr operation available on WriteStreams It does not add the string to a stream it merely returns it e on e g f a string to read ReadStream on gt a ReadStream f String new WriteStream on gt a Wr
262. e user is prompted to specify the interval between commands in seconds The value entered must be between 5 and 360 seconds the default is 15 The heartbeat interval is displayed in the title bar of the window The global variable heartbeatInterval can also be used to specify the heartbeat interval Figure 5 23 Heartbeat Interval Dialog Enter heartbeat interval 5 lt n lt 360 secs e Status gt Set heartbeat reply time This option is only available when the heartbeat service has been stopped If this option is selected the Heartbeat Reply Time Dialog shown in Fig 5 24 is displayed The user is prompted to specify the length of time to wait for a reply in seconds The value entered must be between 1 and 5 seconds the default is Chapter 5 WebBase Windows 5 The global variable heartbeatReplyTime can also be used to specify the heartbeat reply time Figure 5 24 Heartbeat Reply Time Dialog Enter heartbeat reply time 1 lt n lt 5 secs Bo Cancel e Status gt Set heartbeat reset TCP This option is only available when the heartbeat service has been stopped If this option is selected the Heartbeat Reset Dialog shown in Fig 5 25 is displayed The user is prompted whether the TCP IP socket should be reset when a command times out The default is that the socket will be reset The global variable heartbeatResetTCP can also be used to indicate whether the TCP IP socket should be reset Figure 5 25 Heartbeat Reset
263. eDir File open in The myFilel instance is used for read access the myFile2 instance is used for write access e close e g f myFilel close gt a File on default htf returns the receiver after closing the file e directory e g f myFilel directory gt a Directory on c ittp wbwizard returns the directory which contains the receiver e flush e g f myFilel flush gt a File on default htf returns the receiver after forcing all data written to the receiver to be recorded on disk e getFileTime e g f myFilel getFileTime gt 02 26 97 15 22 40 returns a universal time representing the system time of the file e name e g f myFilel name gt default htf returns a string containing the receiver s file name e pathName e g f myFilel pathName gt cMttpwbwizardMefault htf return a string that contains the entire path name drive path filename ext e readBuffer atPosition e g set strBuf 100 String new f strBuf 1 myFilel readBuffer atPosition strBuf gt lt see below gt returns the number of bytes read starting at the position specified in the second argument into the first argument The result of the above example is set Soutput false 1997 ExperTelligence Inc All Rights Reserved reDirect2 Wi e size e g f myFilel size gt 184 returns the number of bytes in the file e writeBuffer ofSize atPosition e g set strBuf Data to be written into a
264. eartbeat Window is opened when WebBase is started By default the window is not opened If heartbeatWindow is created as a global variable with a value of true the window will be opened each time WebBase is started Note that if WebBase is started as a service under Windows NT no windows may be displayed More information on the WebBase Heartbeat window can be found in Chapter 5 lastModified When the processed information is returned back to the browser additional header information is attached to the message One of the fields returned by the server is Last Modified This field indicates the date and time at which the server believes the file was last modified This is not always meaningful because many forms are dynamic they contain data taken from a database etc Thus what the user sees is not really the htf form itself but what the form caused to be generated and returned to the browser The user can set lastModified to any of 3 values a UniversalTime true or false If the user sets lastModified to dateTime or any other UniversalTime that is the date and time that will be returned in the header If lastModified is set to true then the current JodateTime value is returned in the header If lastModified is set to false the Last Modified header entry is not returned by the server If the user does not set the value of lastModified the date the file was last modified is returned to the browser max the maximum n
265. ecified name exists on the browser it should be deleted If the user has just created the cookie variable using the setCookie macro and then deletes it the information is still returned to the browser which should do nothing since no cookie by that name exists on the browser Example 8 28 removeCookie Macro create and remove a cookie variable setCookie cVar abcdef removeCookie cVar remove a cookie variable that probably already exists removeCookie WebBaselD WebBase User s Guide 99 Chapter 8 Macros removeGlobal lt varNames gt The removeGlobal macro removes the specified global variable s from memory it does not delete them from the System Registry The next time that WebBase is started the global variable will once again exist unless it is explicitly removed from the System Registry If no global variable with the specified name exists no error is returned One or more variables can be specified as arguments see the remove macro for more details Example 8 29 removeGlobal Macro create and remove a global variable setGlobal gVar myCompanyName more WebBase statements removeGlobal gVar removeHeader lt varNames gt The removeHeader macro removes the specified header variable that was created using the setHeader macro If no header variable with the specified name exists no error is returned One or more variables can be specified as arguments see the remove macr
266. ection caching WebBase User s Guide 243 Chapter 11 Expressions 244 canAccept e g f Yocmd canAccept gt OrderedCollection Connection gt Keep Alive User Agent gt Mozilla 3 0 Win95 I Host gt 127 0 0 1 Accept gt image gif image x xbitmap image jpeg image pjpeg Cookie gt WebBaselD W14696994E161808318465B CookieCounter 5 Returns an ordered collection of associations of the header keys and their values The operation is a bit misnamed since Accept is only one of the keys that is returned clearFormsCache e g f cmd clearFormsCache gt a HttpGetN Clears all the forms from the forms cache clearOdbcCache e g f cmd clearOdbcCache gt a HttpGetN Clears all the connections from the ODBC connection cache This should be used when trying to release a database file for external modifications cmdStr e g f cmd cmdStr gt GET Returns the type of command issued GET POST or HEAD command e g f cmd command GET httpcmd argl abc amp arg2 1 ATTP 1 0 Returns the full command up to and including the HTTP 1 0 command line terminator commandString e g f cmd commandString gt GET httpcmd argl abc amp arg2 1 HTTP 1 0 Connection Keep Alive User Agent Mozilla 3 0 Win95 I Host 127 0 0 1 Accept image gif image x xbitmap image jpeg image pjpeg Cookie WebBaselD W14696994E161808318465B CookieCounter 5 Returns the full command
267. ecuted once at the specified time on the given date If no time argument is specified a time of 00 00 00 on the given date is assumed The period argument has no effect on the scheduling when date is specified Note Both date and time arguments are processed as being equal to or less than the current date and time When the entry is checked it will be executed if the date is the current date or a prior date and the time is the current time or has already expired If no date argument is specified the entry will be executed periodically until it is explicitly removed from the queue or the WebBase server is terminated If a time argument is provided the entry will be executed once per day at the specified time The period argument has no effect when time is specified If the time argument is specified and a period argument is also provided the entry will be executed once every period minutes If no date time or period argument is provided the entry will be queued but will never be executed The removeTimer operation see HttpCommand section in Chapter 11 can be used to remove a timer queue entry based on its id There are no operations currently provided for manipulating or inquiring into the scheduling parameters date time or period of a timer entry once it has been placed on the timer queue The WebBase WebWizard More Examples includes an example of how to use the timer macro to schedule a form to be regularly processed Example 8 46 T
268. ed e GEY e g gt returns the greater than or equal to gt sequence of characters e gfmt e g JPG a variable that returns the string JPG if the browser reports that it supports the Jpeg image display or GIF if it does not so indicate e globalVariables e g Dictionary SortedList gt SortedList OrderedCollection gt OrderedCollection ReadStream gt ReadStream String gt String a dictionary of all the global variables The keys to the dictionary are the names of the variables the values are the values of the global variables This is useful to determine if a particular global variable has been defined The dictionary returned by this variable is a copy of the dictionary containing all the global variables Thus modifying this dictionary will have no effect on the global variables active in WebBase This dictionary should be used for information only See also globalVariableseHTML WebBase User s Guide 135 Chapter 9 Variables e globalVariableseHTML e g see below formats the global variables and their values for a nice printout on the browser See also global Variables Example 9 21 globalVariablesHTML display Global Variables 23 SArrayS Array SSortedList SortedList Strings String o e AssociationS Association e DatabaseInfo Databaselnfo e Date Date e Dictionary Dictionary e Directory Directory e
269. ed in the with macro an error would result since it is not part of the current result set being used to determine field variables VarFromCltn2 with forRow Database table and field names can often include spaces In order to use a table name with a space as part of an SQL statement e g INSERT SELECT the table name must be enclosed in double quotes as in sql to cltn source aSrc user aUser password aPwd SELECT FROM My Table sql Field names that contain a space must also be referenced as field variables using double quotes as shown in the following File No Only field variables can include embedded spaces All other WebBase variables must consist of characters other than the space character 15 Some database applications such as Access allow the use of square brackets to specify table or field names that include spaces Square brackets can be used with table and field names in WebBase but the SQL standard is to use double quotes WebBase User s Guide 117 Chapter 9 Variables Note Many databases also have reserved words such as Date Time Order etc These reserved words can be used in sql statements such as SELECT only if they are enclosed in double quotes Double quotes can be used around any field name with or without spaces and reserved word or not without generating problems WebBase
270. ed in the input string The time is the same as the time in the receiver Acceptable date string formats are mm dd yy mm month dd day yy year FEB 10 96 10 FEB 96 e day e g f dateTime day gt 35140 returns the number of days elapsed from January 1 1901 until the specified date This is equivalent to f dateTime date day e dayIndex e g f dateTime dayIndex gt 2 returns the index for the day of the week 1 Mon 7 Sun This is equivalent to f dateTime date dayIndex e dayName e g f dateTime dayName gt Tuesday returns the symbol identifying the day of the week This is equivalent to f dateTime date dayName e dayOfMonth e g f dateTime dayOfMonth gt 18 returns an integer from 1 to 31 specifying the day number within the month This is equivalent to f dateTime date dayOfMonth e dayOfYear e g f dateTime dayOfYear gt 77 returns an integer from 1 to 365 identifying the day number within the year This is equivalent to f dateTime date dayOfYear e daysInMonth e g f dateTime daysInMonth gt 31 returns an integer identifying the number of days in the month This is equivalent to f dateTime date daysInMonth e daysInYear e g f dateTime daysInYear gt 365 returns an integer identifying the number of days in the year This is equivalent to f dateTime date daysInYear WebBase User s Guide 219 Chapter 11 Expressions 220 days
271. ed is to be closed and released following its use 14 4 Microsoft Access Database Issues ODBC Driver Bug Workaround The ODBC driver for MS Access included in ODBC Driver Pack 3 for Windows NT and Windows 95 systems has a bug that Microsoft is working on correcting The symptom of this bug is that WebBase will crash or simply quit with no error indication whatsoever If you experience these problems are running on Windows NT 4 0 and are using Microsoft Access 1t is recommended that you implement this workaround Accessing an MS Access database via ODBC while running under Windows NT 4 0 presents a problem when one attempts to free the memory associated with the first allocated ODBC connection handle In most cases attempting to free this area of memory results in a GPF or WebBase User s Guide 271 Chapter 14 Database Issues 272 Protection Violation error This may not occur the first time but it will usually occur within the first three or four times that same memory area is allocated and freed WebBase uses ODBC to access its databases and must allocate a connection handle when first connecting to a database Under default conditions this handle is retained in the WebBase ODBC cache after its allocation and remains in cache until the WebBase server is shut down or the user explicitly clears the ODBC cache Under either of these conditions it is probable that the above described GPF error will then occur If a user has disabled the O
272. em DSN when running the database examples if not previously set up It is used in this case as an example of how the user will configure their own data sources for their databases WebBase User s Guide 29 Chapter 3 Installation Finish button For this example the Cars database is an Access database so the Microsoft Access Driver is selected Figure 3 18 ODBC Source Creation Driver Selection Create New Data Source Select a driver for which you want to set up a data source ly 3 50 342800 Microsc Microsoft dBase we m oh 3 50 342800 Microsc Microsoft Excel Driver xls 3 50 342800 Microsc Microsoft FoxPro Driver dbf 3 50 342800 Microsc Microsoft Paradox Driver db 3 50 342800 Microsc Microsoft Text Driver txt csv 3 50 342800 Microsc Microsoft Visual FoxPro Driver 5 00 00348 Microsc SQL Server 2 65 0213 Microsc 1 Cancel After the database driver is selected it is necessary to specify the name to be assigned to the source as well as the database file to use Figure 3 19 shows the screen on which this information is entered Figure 3 19 ODBC Source Name Definition ODBC Microsoft Access 97 Setup Ea Data Source Name myAccess DK Description webB ase database example Cancel Database 1 Database C HTTP WbWizard DBEx autos mdb Help Create Repair Compact E a GC OA AAA O 1 None System Database Options gt gt C Dat
273. em Registry also can have name value pairs associated with it Each key value pair has a default name value pair automatically created for it the name is Default and the value is value not set In the following the terms keys values and name value pair will be used to specifically identify the type of data being accessed in a registration database Registration Database Instance Operations The examples in the following will use a RegistrationDatabase instance set up using the following set regDB SOFTWARE ExperTelligence Inc WebBase 4 10 Parameters RegistrationDatabase localMachine at e add e g set assoc exampleKey exampleValue Association key value f assoc regDB add set strm String new YoWriteStream on f strm regDB printHierarchyOn f strm contents gt exampleKey exampleValue returns the argument after adding it to the receiver The argument must be an association Note that this creates a key in the specified registration database the default value within this key is specified as the association value e g exampleValue This does NOT add a new name value pair into the specified registration database To add a new name value pair into a registration database f SOFTWARE ExperTelligence Inc WebBase 4 10 Parameters assoc sRegistrationDatabase localMachine at put e at e g f SOFTWARE ExperTelligence Inc WebBa
274. encouraged to read through the different operations available to become familiar with the various data types as well as the types of operations that can be performed upon and with them For each data type there are operations that can be performed upon an instance of the data type There may also be operations that can be performed upon the class itself There are several WebBase expression operators that are represented by special characters F amp concatenation z logical AND logical OR General Instance Operations The operations described in this section may be used with an instance of any type of WebBase data e g numbers strings collections asString returns a string representing the information stored in the receiver Each WebBase data can represent itself differently as a string copy returns a copy of the receiver which can subsequently be modified without affecting the receiver hasMessage returns false unless the receiver is an ODBCRowObject which has an associated message or if the receiver is a collection and one of the members of the collection is an ODBCRowObject which has an associated message isArray returns true 1f the argument is an array otherwise false isAssociation returns true if the argument is an association otherwise false isBoolean returns true if the argument is a Boolean e g true or false otherwise false isCharacter returns true if the argument is a character otherwise fa
275. ending e g f SortedList newDescending gt SortedList returns an empty sorted list whose sort order for elements is descending 11 16 Associations 202 An association associates two objects known as the key value pair Association objects are used to store information into dictionaries Association Instance Operations This section describes all the operations that can be performed on an association There are two examples associations used in the following examples assocl and assoc2 They are generated using set assocl Version Yoversion Association key value and set assoc2 Build build Association key value Although both of these examples include strings as the keys and values it is possible to have any data type as a key or a value However it is recommended that keys be strings or symbols whenever possible lt e g f assoc2 assocl lt gt false returns true if the receiver key is less than the argument key otherwise false Note that the argument must also be an association e lt e g f assoc2 assoc lt gt false returns true if the receiver key is less than or equal to the argument key otherwise false Note that the argument must also be an association e e g f assoc2 assocl gt false returns true if the receiver key and the argument key are the same otherwise false e gt e g f assoc2 assoc gt gt true returns true if the receiver key is greater than t
276. enger lt td gt lt td gt European lt td gt lt tr gt returns a string containing all the field values properly formatted see printField on e printRecord e g f examORO printRecord gt 26 92 BMW 318 IS 45 Speed 2 Door Red 3000 22900 0 true false Passenger European returns a string containing all the field values properly formatted e printTHColumnNamesOn e g set stream String new WriteStream on f stream examORO printTHColumnNamesOn gt lt tr gt lt th gt ID lt th gt lt th gt Year lt th gt lt th gt Maker lt th gt lt th gt Model lt th gt lt th gt Cylinders lt th gt lt th gt Transmission lt th gt lt th gt Kind lt th gt lt th gt Color lt th gt lt th gt Mileage lt h gt lt th gt Price lt th gt lt th gt Air lt h gt lt th gt Cruise lt th gt lt th gt Category lt th gt lt th gt Country lt th gt lt tr gt returns a string containing the column names as HTML lt TH gt headings e tableWidth e g f examORO tableWidth gt 167 returns an integer representing the width of all the columns in the receiver WebBase User s Guide 237 Chapter 11 Expressions valueAt e g f 1 examORO valueAt gt 26 returns a string representing the value of the field specified in the argument The argument can be an integer string or symbol identifying the field 11 32 OdbcRowHeaders 238 The OdbcRowHeader contains a number of OrderedCollection slots each collection the size of the number
277. ently unavailable Please try again later if When it is time to perform maintenance on the file either locally or remotely set the global variable to false reload the global variables and then users will get the message that the database is unavailable After the maintenance is completed which can be in 1 minute or 1 hour the value of the global variable is changed to true and users can again access the database successfully Think of it as sort of an sql protect macro you re not checking for errors as much as you re checking for the availability of the database SQL Selects amp Timing If ODBC connection caching is used as is the default it has been discovered that a problem can occur when an INSERT UPDATE or DELETE of the database is done immediately followed by a SELECT in which the changed information is to be reflected Users who force the connection to be closed following the INSERT UPDATE or DELETE consistently find their new or updated data in the subsequent SELECT Closing the connection flushes any pending INSERT or UPDATE operations that are apparently performed in an asynchronous fashion It is possible to close the connection following an INSERT UPDATE or DELETE or a SELECT for that matter by including the cache false keyword value pair in the sq macro This tells WebBase that regardless of whether a cached or a new connection was used for the SQL statement the connection that was us
278. eptable for the response This field allows clients capable of understanding more comprehensive or special purpose character sets to signal that capability to a server that is capable of representing documents in those character sets The ISO 8859 1 character set can be assumed to be acceptable to all user agents If no Accept Charset header is present the default is that any character set is acceptable If an Accept Charset header is present and if the server cannot send a response which is acceptable according to the Accept Charset header then the server SHOULD send an error response with the 406 not acceptable status code though the sending of an unacceptable response is also allowed Accept Encoding similar to Accept but restricts the content coding values which are acceptable in the response If no Accept Encoding header is present in a request the server MAY assume that the client will accept any content coding If an Accept Encoding WebBase User s Guide header is present and if the server cannot send a response that is acceptable according to the Accept Encoding header then the server SHOULD send an error response with the 406 Not Acceptable status code e Accept Language similar to Accept but restricts the set of natural languages that are preferred as a response to the request e Authorization A user agent that wishes to authenticate itself with a server usually but not necessarily after receiving a 401 respon
279. er after the specified association has been removed from it If the association is not in the receiver reports an error e removeKey e g f Version dictl removeKey dictl gt Dictionary Build gt 36 returns the receiver after the association whose key is the same as the argument is removed from it If an association is not found an error is reported e size e g f dictl size gt 2 returns the number of elements contained in the receiver e urlArgString e g f dict urlArgString gt Build 56 amp Version 4 10 returns a string of key value amp key value entries that can be used on a URL command line Dictionary Class Operations The Dictionary class can be accessed using the variable Dictionary This section covers those operations that are sent to the Dictionary variable The operations described above for general collection classes are also applicable for this variable e new e g f Dictionary new gt Dictionary returns a new empty dictionary WebBase User s Guide 205 Chapter 11 Expressions 11 18 Characters 206 Characters in WebBase are specified using the format a where the actual character desired follows the Note that characters and strings are represented and handled differently within WebBase Several special characters their description and their ASCII value are available as follows 8 Em TER This section describes all the character related opera
280. er macro Example 8 42 setUser Macro set SuserName myUserDict setUser xx test signalError lt error text string gt The signalError macro signals an error that results in the argument being displayed as shown below This macro can be helpful in simulating situations which could return errors under some circumstances It allows you to develop appropriate errorProtect errorProtect constructs and or error logging procedures without having to force actual error conditions As with other errors this error can be caught in the errorProtect macro to prevent the message from reaching the user but allowing one to escape to the onError clause within the errorProtect macro The first example below shows the error message that will be displayed on the browser if the error is not trapped using the errorProtect macro The second example shows the use of the errorProtect macro to redirect the user to a form instead of displaying the error message 106 WebBase User s Guide Example 8 43 signalError Macro no error trapping signalError You should not be here The following is then displayed on the user s browser An error occurred processing your request Merging data into macro form You should not be here Example 8 44 signalError Macro with error trapping errorProtect if answer isNull signalError x if onError reDirect GetAnsr htf errorProtect sql
281. erate as if the local time is GMT and no time conversion will take place when sending the current time and forms expiration time to browsers Editing Parameters WebBase parameters are provided for Windows 3 1 and Windows for Workgroups in the file WebBase ini This file must reside in the same directory as the WebBase application e g c webbase The WebBase ini file must contain the WebBase parameters described in Chapter 4 as well as the parameters listed above The following is an example of a WebBase ini file WebBase User s Guide 301 Appendix B Special Configuration Issues Figure B 3 Example WebBase ini file WebBase 4 10 INI file Required Parameters PortNo 80 Directory c WebBase License 12345 67890 Optional Parameters LogDirectory c WebBase errorLogFil c WebBase WebError log Default default htf default htm Extension htf htm HostAddress 1 2 3 4 Time Zone Support standardBias 360 daylightBias 60 standardName Central Standard Time daylightName Central Daylight Time daylightStartMonth 3 standardStartMonth 10 Items in square brackets are comments The parameter name to the left of the sign is CASE SENSITIVE while the value to the right is not Extensions For Windows 3 1 and Windows for Workgroups the optional WebExtns ini file defines the extensions within the WebBase environment If no extensions are to be defined by the user then t
282. erchangeably e Receiver an instance to which a message is sent A sender object passes a message to the receiver object which processes the message and then passes back a return value 2 4 WebBase Server vs HTTP Server 10 WebBase executes on a computer as a Web Server in a fashion similar to Windows based servers such as the Netscape Communications Server or Microsoft Internet Information Server IIS with one major difference Whereas traditional Web Servers are designed to handle HTML and do not interface with databases WebBase is designed to interface to databases without the requirement of developing CGI scripts For this reason many applications developed to take advantage of the database accessing capabilities of WebBase are in fact multiple Web Server applications They are designed to use a traditional Web Server to present Home Page screens and top level introductory information to the user while directing database queries to the WebBase Server WebBase is capable of handling all of the standard HTML features performed by other Web Servers Depending on your application and anticipated load you can have a single host machine configured with a single WebBase server or you can have a single host machine with two servers and two ports or you can have an extensive collection of hosts some running traditional Web Servers and others running WebBase WebBase User s Guide q E Installation E Expertolligonce Chap
283. ere IS a space between the f and the subsequent expression terms If the expression is written as f lt exp gt an error will result Example 8 15 Macro f foo EXE SFile execute forlndex lt indexCtr gt lt args gt forlndex The forIndex macro iterates over the enclosed text a specified number of times updating an index variable with the value of the current counter for each iteration The first argument indexCtr is required and is a variable name for the index counter The optional keyword value pairs for the forIndex macro are described in the table below WebBase User s Guide The starting value of the index The default value is Le to Integer The maximum or ending value of the index The default value is 1 If not specified the forlndex loop will execute only 1 time iteration through the macro The default value is 1 A AA macro Example 8 16 forIndex Macro forIndex anIndexVar from 3 to 17 by 2 The current forIndex loop counter is anIndexVar forIndex forRow lt currentRow gt lt optionalArgs gt forRow The forRow macro iterates over the enclosed text once for each result in a collection including one that contains results from an sql query The first and a required argument is a variable name which will receive the current entry in the collection during each iteration of the loop If the collection contains the results of a sql query this variable will hold an O
284. erge This entry is either a fully qualified name accessible via a Domain Name Server e g mail myhost com or the IP address of the mail server host e g 11 22 33 44 The Mail Log The Mailer maintains a log of all mail processed and any error messages encountered while trying to process that mail This log is similar to the standard WebBase log in that daily log files are created in the location specified in the LogDirectory parameter just as is done for WebBase The mail log files are preceded with the prefix WM for WebBase Mail rather than the WB used for the default WebBase logs Menu items in the WebBase Server window s Option menu allow the user to enable disable the mail log and flush the mail log Note One must specify a LogDirectory parameter to have mail logging available One can provide such a parameter then disable normal logging if only mail logging is desired Shutting Down WebBase If WebBase is shut down either normally or abnormally any messages in the mail queue that have not yet been delivered will be lost The mail queue is strictly a memory only queue with no backup to disk support If you are going to frequently generate mail messages within WebBase that must be delivered it is recommended that your messages be queued in the mail queue as well as saved within a database After a message has been sent it can be removed from the database If WebBase terminates your messages are saved in the database You can t
285. ers are not used by the actual database application they are only used by secondary applications such as WebBase which are indirectly accessing the database The ODBC drivers on the WebBase CD are found in directories that specify the particular operating system e g Win95 NT351 The ODBC driver packs on the WebBase web site are also similarly identified It cannot be stressed strongly enough that the proper ODBC drivers for the operating system version must be used The majority of problems that users encounter with ODBC and WebBase are the result of an incorrect match between ODBC database driver and operating system version Installing the ODBC Drivers The ODBC driver packs included with WebBase include all of the drivers for the standard Microsoft applications Before installing the ODBC Driver Packs be sure to read the End User License Agreement distributed with the ODBC Driver packs This document outlines the terms and conditions under which you may install and use the ODBC drivers Installation instructions are also provided with each of the ODBC driver packs Setting the ODBC Sources In order for WebBase to access a database an ODBC source for that database must be created An ODBC source assigns a name and optionally a username and password to a particular database file This ODBC source name username and password are then used by WebBase to access the database Once the ODBC drivers are installed there will be an ODBC ico
286. erverAddress e g 127 0 0 1 the IP address of the WebBase server in dotted 000 000 000 000 format When one has multiple IP addresses assigned to the WebBase port this allows one to detect which address was referenced by the incoming query and take a possibly different path based on IP address See Chapter 4 for more information on multiple domain support JoserverAverage e g 7 07680945 the average number of seconds that each command has taken to be processed by the WebBase server This is simply the amount of time WebBase has been running since last launched divided by the number of commands it has processed It does not take into account any idle time and therefore is not a measure of the performance of the server See also oserverAverageHTML serverAverageHTML e g 7 07680945 seconds per command formats the current statistic on the average number of seconds that each command has taken to be processed by the WebBase server for a nice printout on the browser as shown below This is simply the amount of time WebBase has been running since last launched divided by the number of commands it has processed It does not take into account any idle time and therefore is not a measure of the performance of the server See also ZJoserverAverage Example 9 31 serverAverageHTML display 7 07680945 seconds per command serverElapsedTime e g a TimeDifference 1 19 51 the amount of time that the server has been active This val
287. es is displayed in the title bar of the window The number of lines specified can affect system performance as a large number of lines will require a large memory buffer The global variable transactionsMaxLines can also be set to specify the number of lines on this window The keyboard shortcut lt ctrl gt S Chapter 5 WebBase Windows 60 press the Ctrl key and the S key down at the same time can also be used to perform a cut Operation Figure 5 18 Set Lines Dialog Enter max lines 10 lt n lt 10000 Cancel Status gt Posting enabled If this option is selected information will be written to the window If the option is turned off no check mark is displayed next to the option the background of the window is displayed as dark gray and no data will be written to the window For example the user can select the Show TCP IP Status option and nothing will be displayed in the window if posting is disable Status gt Start transaction writing This option is only active if the Stop transaction writing option was previously selected It will cause transaction information to again be displayed in the WebBase Transaction Services window Status gt Stop transaction writing This option is only active if transaction information is being written to the WebBase Transaction Services Window When the WebBase Transactions Services Window is opened transaction information will automatically start being written to the text a
288. es posting of information into the WebBase Heartbeat Window If set to false it will cause posting into the WebBase Heartbeat Window to be disabled when the window is opened either automatically via the heartbeatWindow variable or manually via the Edit menu Posting uses memory and processor resources so it might be desirable in a production system to disable posting Error messages will continue to be posted even though posting is marked as disabled The TCP IP reset will also be issued when appropriate regardless of the posting enabled status WebBase User s Guide 149 Chapter 9 Variables 150 heartbeatReplyTime this variable defines the length of time the heartbeat function will wait for a reply in seconds The value must be between 1 and 5 seconds the default is 5 More information on the WebBase Heartbeat window can be found in Chapter 5 heartbeatResetTCP this variable is either true or false and defines whether the TCP IP socket will be reset when a heartbeat command times out If not specified the default value is true More information on the WebBase Heartbeat window can be found in Chapter 5 heartbeatSound this variable is either true or false and defines whether a sound is played if a heartbeat failure is identified If not specified the default value is false More information on the WebBase Heartbeat window can be found in Chapter 5 heartbeatWindow this variable determines whether a WebBase H
289. esHTML 141 OrderedCollection 124 186 202 OrderedList 125 186 202 WebBase User s Guide os 141 Foutput 102 141 password 107 151 Point 125 181 priority 141 random 141 ReadStream 125 233 234 ReadWriteStream 125 233 235 RegistrationDatabase 125 243 reserved Words 115 142 J resevedWordsHTML 142 results 93 107 143 returns 143 rightBrace 84 143 Jroot 143 rootDirectory 143 rowCount 109 143 rowCounter 93 143 YrowHeader 143 search 143 seconds 143 Joself 144 selfDirectory 144 YserverAddress 43 144 JoserverAverage 144 JserverAverageHTMLO 144 serverElapsedTime 144 serverHostName 37 44 144 JserverStartTime 144 serverThroughput 144 serverThroughputHTML 145 skipCookies 151 skipHeaderComment 128 151 SortedCollection 125 186 202 SortedList 125 186 203 source 107 151 sq BufferSize 151 Jostart 151 Jostatistics 145 YstatusCode 152 String 125 186 197 theArgs 152 time 145 216 Time 125 217 timeStamp 145 title 145 transactionsMaxLines 59 153 transactionsWindow 58 153 UniversalTime 125 223 JoupdateStats 153 user 107 153 JouserExpires 145 161 JouserLimit 145 161 JuserName 145 160 JouserVariables 146 JouserV ariablesHTMLO 146 JovarList 153 Joversion 146 J WH
290. escribed at the start of this chapter This display allows the user to see specifically which local variables came from command line arguments See also inputVariables Example 9 23 inputVariablesHTML display Input Variables 2 e arg2 abc e now 32254 e PLE e g lt returns the less than or equal to lt sequence of characters e leftBrace e g returns the left brace character This is provided should you wish to display a character in your htf form and not have WebBase interpret it as the opening character of a macro or variable construct It is similar to the HTML amp lt sequence Setting this name with the set macro will change what is returned for the duration of the containing htf form but will have no effect on the fact that WebBase will still interpret the character as a special character used to start macro and variable fields within an htf form The brace macro can also be used to add braces around strings e local e g true a Boolean value identifying whether the browser that generated the request is on the same system as the WebBase server This is equivalent to comparing serverAddress with YobrowserAddress e localVariables e g Dictionary CookieCounter gt 2 accepts gt OrderedCollection image gif image x xbitmap image jpeg image pjpeg a dictionary of all the local variables The keys to the dictionary are the names of the WebBase User s Guide
291. etVariable 247 Global variables 54 100 104 115 124 304 Global Variables 58 305 gmt 222 223 gmt built in command 27 H hasMessage 170 184 238 hasNetworkName 229 hasSubdirectory 229 320 HEAD 64 header 238 Header variables 121 HeartBeat Menu Option 54 HKEY_CLASSES_ROOT 240 HKEY_CURRENT_USER 240 HKEY_LOCAL_MACHINE 240 HKEY_USERS 240 Host 37 121 144 308 HostAddress parameter 37 66 HostName parameter 37 44 135 hours 217 222 hours minutes seconds 218 HREF 281 htf Files 6 htf macro 94 HTML 6 10 63 155 HTML Editor See WebberActive HTTP Root Directory 17 36 HTTP server 6 10 HTTP_Proxy 267 HTTP_Proxy parameter 37 HTTP_ProxyPort 38 267 Hypertext Markup Language See HTML I if macro 9 82 95 If Match 308 If Modified Since 308 If None Match 308 If Range 309 If Unmodified Since 309 in parameter 313 include macro 311 includes 184 206 includesKey 206 241 indexFor 238 indexOf 184 231 indexOfCollection 184 indexOfLowercase 231 indexOfMonth 215 indexOfString 193 indexOfString startingAt 193 Indirection See Variable indirection Initialization 35 Input Forms 6 80 INSERT 7 75 82 insert macro 84 95 Install log 13 Installation Custom 22 NT Service 32 ODBC Drivers 28 ODBC Sources 28 Standard 14 Testing 25 Instance 9 WebBase User s Guide
292. eta Mir set b file htf f ba appendFilenameUNIX gt dir file htf returns a new string in which the receiver is combined with the argument to generate a pathname including the correct number of characters between each directory and filename i e always one and not two or no characters This ensures that the UNIX directory separation character is used e asArrayOfSubstrings e g f roses and daisies asArrayOfSubstrings roses and daisies returns an array of substrings from the receiver The receiver is divided into substrings at the occurrences of one or more space characters e asArrayOfSubstringsSeparatedBy e g f 555 11 5555 asArrayOfSubstringsSeparatedBy gt 555 11 S555 returns an array of substrings from the receiver The receiver is divided into substrings at the occurrences of one or more of the input argument which is a character e asBoolean e g f 0 yes asBoolean true f 0 maybe asBoolean gt 0 f 0 0 asBoolean false returns true if the first character of the receiver is a t or T or y or Y or if the receiver converted to a number is not zero Returns false if the first character of the receiver if a P or F or n or N or if the receiver converted to a number is zero If none of these are satisfied returns the argument WebBase User s Guide 187 Chapter 11 Exp
293. ew Al x File Edit Reload GET POST CHEAD Accept Location Copyright 1995 7 ExperTelligence Inc From the WebBase Total View Window the user can reference a web site via an Open Location command just like most web browsers But rather than processing the returned HTML WebBase Total View merely displays the returned HTML header and all It is an extension of the View Source functionality available with most browsers with the additional feature of not stripping off the header information WebBase Total View Menu Bar The following menu options are available on the WebBase Total View Window e File gt New Window If this option is selected a new WebBase Total View Window is opened This is equivalent to selecting the Total View option from the Edit menu of the WebBase Server window e File gt Open Location If this option is selected the Open Location Dialog shown in Fig 5 20 below is displayed The user is prompted to enter a location to which a request will be sent The information entered by the user on the prompt is subsequently displayed in the Location field which is described below Figure 5 20 Open Location Dialog Open Location x Open location Po Cancel e File gt Exit If this option is selected the WebBase Total View Window is closed Closing this window has no effect on other WebBase functions Chapter 5 WebBase Windows 64 Edit gt Cut this menu option pro
294. f 0 593 Float fromString decimalSeparator 0 593 WebBase User s Guide 177 Chapter 11 Expressions returns a floating point conversion of the first argument using the second argument as the decimal separator See fromString for the format of the first argument e pi e g f Float pi gt 3 14159265 return the floating point representation of pi 11 6 Fractions This section describes all the operations that can be performed on fractions A fraction is represented by two integers and a e g 1 2 Fractions can also perform any of the operations described in the General Number Operations section above Fraction Instance Operations Fractions are always instances of the class Fraction which is accessed via the variable Fraction The Fraction class operations that can be done are described in the following section e asFloat e g f 13 5 asFloat gt 2 6 returns the receiver Fraction Class Operations The Fraction class is accessed using the variable Fraction The following operations can be performed on this class e numerator denominator e g f 15 28 Fraction numerator denominator gt 15 28 returns a new instance of fraction with the numerator specified in the first argument and the denominator specified in the second argument 11 7 Points A Point represents a position in two dimensions e g the cursor s position on a screen It consists of a pair of numbers x and y
295. f uses the filename string as the complete pathname for accessing the inserted file This format specifies a filename that is absolute Note forward slash URL syntax and backslash DOS characters can be used interchangeably within htf when referencing local files WebBase will convert all characters to as necessary to access files within the Windows host environment Example 8 21 insert Macro set fileone address htf insert fileone output lt args gt output WebBase does not process the text contained within the output macro but inserts it into the output HTML exactly as encountered Variables and other macro keywords are not processed but are output with their enclosing characters as entered in the htf file The optional keyword value pairs supported by this macro are described in the table below convert Boolean If true all lt and gt characters are converted to the character sequences amp lt and amp gt respectively so that HTML forms can be printed as part of the text rather than being interpreted by the browser If false default no character conversion is done insert String The name of another file to be output without processing This allows one to output the contents of a file rather than including the file to be processed by WebBase See the insert macro for the formats of the argument WebBase User s Guide Note Since the purpose of the output macro is to insert text
296. f a match is found whose value is nil returns an empty string e getVariable e g f nyVar cmd getVariable gt Returns the contents of the variable requested or nil if the variable is not found This differs from simply using the variable which would result in an error being generated if the variable were not defined One can wrap the variable usage in the errorProtect macro but often it is more convenient to use the above form to test for the existence of a variable in situations where it may often be non existent In addition the argument may itself be a variable name not enclosed in single quotes in which case the contents of that variable which must be a string will be used as the name of the variable to be fetched This allows for a level of dynamic indirection in accessing variables If one uses a variable to provide the variable name and the variable does not exist WebBase will generate an error If the variable exists but does not contain a string WebBase will return a value of nil WebBase User s Guide 245 Chapter 11 Expressions 246 isTrue32bit e g f cmd isTrue32bit true Returns true or false identifying whether the server is a 32 bit or 16 bit operating system logRecord e g f Ycmd logRecord gt 127 0 0 1 23 Mar 1997 19 15 56 0800 GET httpcmd arg1 abc amp arg2 1 HTTP 1 0 200 0 Mozilla 3 0 Win95 I Returns the default record that will be written to the default log file
297. f this manual is included in this directory in Word 7 0 format If you do not have Word you can view this document using the Word Viewer program that is provided on the CD or is available as freeware from Microsoft s web site e MSIE This subdirectory contains Microsoft Internet Explorer used with WebberActive The files in this directory are not required to install or use WebBase e ODBC This subdirectory contains the ODBC driver packs for the different operating systems supported by WebBase ODBC driver installation is covered later in this chapter e OFIP This subdirectory contains files used by the ExperForms add on product to WebBase The files in this directory are not required to install or use WebBase e WebberA This subdirectory contains the installation files for the WebberActive HTML editor provided with WebBase WebBase Files on the Web The installation documentation and ODBC driver files are also available as downloads from the WebBase web site at http www expertelligence com WebBase Follow the links to the download documentation or ODBC page and download the appropriate files It is recommended that users frequently check the web pages for information on new features new versions of WebBase or new add on products WebBase User s Guide WebBase User s Guide 13 WebBase Files Generated during Installation After WBSetup exe has been executed the following files will be generated in the defau
298. fied character with the specified string Returns the modified substring WebBase User s Guide NOTE The resulting string may be longer than the original string if the replacement string is longer than a single character The resulting string may be shorter than the original string if the starting and ending positions do not include the entire original String e replaceCharacter with e g f 1 75 Hello replaceCharacter with gt HeKKo Replaces any occurrences of the specified character within the receiver and returns the modified receiver The second argument may be a string character integer or any other non nil object If it is an integer the character value associated with that integer is used not the string representation of the integer NOTE The resulting string may be longer than the original string if the replacement string is longer than a single character e replaceCharacter withString e g f 1 Xx Hello replaceCharacter withString gt HeXxXxo Replaces any occurrences of the specified character within the receiver and returns the modified receiver NOTE The resulting string may be longer than the original string if the replacement string is longer than a single character e replaceNewlinesWithString e g set longText Here is some text with carriage returns and line feeds in it f CR longText replaceNewlinesWithString gt Here is CR some text with CR carriage returns
299. field when returning records that match the select criteria Thus records which have been marked WebBase User s Guide for delete may be returned as part of a collection retrieved via a SELECT statement The database needs to be compressed before deleted records are actually removed WebBase User s Guide 277 Chapter 15 WebBase Q8A WEB mr A w ExperToiligence Chapter 15 WebBase Q amp A This chapter includes some frequently asked questions and their answers Installation problems are addressed in Chapter 3 Additional information may be found on the WebBase Web site and in the WebBase Support Forum on the WebBase Web site 278 How do I upgrade Check the WebBase Web site for instructions on how the latest version of WebBase can be acquired I launch WebBase and try the dateTime command to test the program but get a 404 The requested URL was not found error For any file name or internal command sent to WebBase WebBase will first try and locate the directory specified in the Directory parameter If WebBase cannot locate the directory it reports the 404 file not found error Check your startup parameters to verify that the Directory parameter specified actually exists Why can t I get the database examples to run I see the source of Dbexam1 htf form when I open this file This happens when you do an open file on Dbexam1 htf Many browsers allow you to view local file system files a
300. file you wish to have displayed when a browser references your Directory without specifying a file pathname Multiple defaults can be specified by entering filenames separated by a comma as in default htf default htm When multiple entries are provided WebBase will look for the files in the order entered This is an optional parameter If absent default htf default htm is assumed If you enter an empty string then no default file will be searched for The Extension parameter specifies the name of a file extension you wish WebBase to append to a filename a browser supplies that does not explicitly supply the extension Multiple extensions can be specified by entering them separated by a comma as in htf htm When multiple entries are provided WebBase will look for files with the specified extension appended in the order entered This is an optional Parameter If absent htf htm is assumed The LicensedFeatures parameter is an additional license number that enables WebBase add on products If you have purchased WebBase along with one or more add on products e g ExperForms then you will also need to enter your LicensedFeatures number If not specified the add on features will not be enabled At the bottom of the window is a button labeled Don t Update Registry This button should be selected only during an upgrade if you do not want your existing registry parameters modified It is strongly recommended that the user a
301. for information on user variables e userLimit e g 0 the maximum number of User variable dictionaries allowed See Chapter 10 for information on User Variables and User Variable Dictionaries This variable returns 0 zero which indicates that there is NO limit to the number of user dictionaries e 9 userName e g W14263151E161808318465B the name of the current user variable dictionary If not explicitly specified it defaults to WebBaselD It is possible to have multiple user variable dictionaries in use within one or more forms See Chapter 10 for information on user variable dictionaries e 9 userVariables e g Dictionary altered gt true o expires gt 60 created gt 03 10 97 04 42 25 PM accessed gt 03 10 97 04 42 26 PM UserToken gt UW14269116E161808318480B a dictionary of all the user variables The keys to the dictionary are the names of the variables the values are the values of the user variables If no user variables have been defined for the user dictionary specified by userName returns an empty dictionary This is useful to determine if a particular user variable has been defined One can also set userName to point to a specific dictionary and then use userVariables to dump the WebBase User s Guide 145 Chapter 9 Variables 146 contents The dictionary returned by this variable is a copy of the dictionary containing all the user variables Thus
302. from being cached It can also be used to remove a cached connection at the end of a form that possibly hit the database multiple times and cached the connection earlier so that non WebBase access of the database can be made Once WebBase caches a connection the database has WebBase as a user with exclusive read write or read only access however the ODBC source was specified This prevents the user from accessing the database with exclusive access for maintenance purposes If this database is thus accessed on a routine basis it is possible the user might wish to not leave the connection cached while wanting cached connections for other databases max Integer The maximum number of records the query is to return By default all records matching the query specifications are returned The WebBase WebWizard Database Example 4 shows how to implement More and Previous buttons using this keyword start Integer The number of the first matching record to be returned 1 e skip the first start 1 matching records The WebBase WebWizard Database Example 4 shows how to implement More and Previous buttons using this keyword 108 WebBase User s Guide rowCount String The name of the variable that will hold the number of INSERTED rows If this variable name is not specified rowCount is used error String The name of the variable that will hold any error messages reported by the ODBC driver This can be used t
303. function can be used to send commands to WebBase on a timed basis and receive reports on the reply status of the commands When a command times out the heartbeat function can reset the TCP IP socket in an attempt to clear the problem and reissue the command to see if that socket reset has again enabled the communications port The WebBase Heartbeat Window reports on the heartbeat commands and replies The heartbeat function is only activated if the WebBase Heartbeat Window is opened by selecting the menu option or if the global variable heartbeatWindow is set to true Ifa user wants to have the heartbeat function always active when WebBase is started then heartbeatWindow should be created as a global variable Note On Windows NT systems in which WebBase is started as a service creating the global variable heartbeatWindow with a value of true is the only mechanism by which the heartbeat function can be started When the WebBase Heartbeat Window is closed the heartbeat function is also terminated the heartbeat function is only active when the WebBase Heartbeat Window is open or iconified Figure 5 22 shows an example of the WebBase Heartbeat Window The first two lines are always displayed when the window is opened to indicate that the heartbeat service has been started The remaining lines indicate the commands that are sent out and replies received The WebBase User s Guide 65 Chapter 5 WebBase Windows 66 menu bar in
304. g with sql provides the details WebBase needs to interface with the database This includes the data source and login information that is specified within the sq macro itself Between the sql and sql keywords is the database query In this case a SELECT statement is used to extract the desired records from the database The WebBase variable name is used within the SELECT statement When the form is processed WebBase replaces name with Denny The resulting SELECT statement received by the database will look like SELECT FROM Examples WHERE Name LIKE Denny The characters before and after Denny are wildcard characters Any database records containing the string Denny will be returned The LIKE operator specifies that the match should be a case insensitive match Thus names such as Denny Bollay Denny s Restaurant and photography by denny are valid Only the first 25 records that have a match will be returned this is controlled by the max keyword that is part of the sq macro The returned records are stored in the WebBase variable answers WebBase User s Guide 81 Chapter 7 htf Files 82 NOTE Any valid ODBC SQL query statement can be constructed and processed by WebBase including UPDATE INSERT and DELETE statements queries are not limited to SELECT statements After the data has been retrieved from the database the WebBase if mac
305. ghputHTML display 8 47839699 commands per minute e statistics e g 4 1 the current contents of the small statistics pane just under the menu bar in the WebBase Server window It typically contains a string with the total command count concurrent commands in process the most recent command string or a date time Idle message e time e g 12 23 14 PM the current local time It is accessed from the operating system and cached once per form the first time it is referenced Although most forms are processed very quickly there are some database queries that can take some time If the processing of a form will take some time and time information is critical the forms designer should create a local variable using an expression like set curTime Time now each time the time is needed instead of using Y time This will eliminate any problems with the caching of time and ensure the proper time is used e timeStamp e g Mon 10 Mar 1997 12 23 10 a string containing the current date and time It is accessed from the operating system and cached once per form the first time it is referenced e title e g WebBase 4 10 build 56 returns the product s title string consisting of its name version number and build number e userExpires e g 60 default expiration time in minutes for User variables This can be overridden by a global variable or it can be set for each individual user variable dictionary See Chapter 10
306. ghtBias 50 for CST daylightBias 60 Daylight Start Month is the start of daylight savings time daylightStartMonth 4 1sJan 12 Dec or O None Standard Start Month is the end of daylight savings time standardStartMonth 10 1 Jan 12 Dec or O None Standard Name is the standard timezone name standardName Central Standard Time Daylight Name is the daylight savings timezone name daylightN ame Central Daylight Time Create INI File Don t Create INI File The standardBias parameter is the number of minutes your time zone is behind GMT The default for this parameter is 360 300 WebBase User s Guide The daylightBias is the number of minutes Daylight Savings Time in your local area is behind Standard Time In most areas Daylight Savings Time differs from Standard Time by 1 hour so the default value of 60 is acceptable If your locale does not adjust for Daylight Savings Time enter 0 The daylightStartMonth parameter is the month in which Daylight Savings Time begins in your locale Months are represented by an integer 1 for January through 12 for December If you locale does not observe Daylight Savings Time enter a O zero here The standardStartMonth is the month in which Daylight Savings Time ends and Standard Time begins again in your locale Months are represented by an integer 1 for January through 12 for December If your locale does not observe Daylight Savings Time enter a O ze
307. ginal receiver is left unmodified For example f 2 3 BC abcdef copyReplaceFrom to with returns a new string aBCdef the receiver is unmodified it is still abcdef 17 5 i r r r r P r 4 r There are a number of operations that do not include a colon but do require an operator including lt gt The information included with each operation description identifies argument requirements 164 WebBase User s Guide The descriptions and examples provided below for the operations supported for each WebBase data type clearly identify the type of data returned It is important to understand what is returned because unexpected errors can result Sound confusing It can be The following section presents several examples of how to develop expressions using RPN 11 2 RPN Notation A WebBase expression is written using the RPN format which is easy for the computer to understand but is difficult to read and frequently difficult to write For example to see if the contents of the variable counter is equal to the constant 3 one would write f counter 3 To determine if the number of results returned in the variable results from a database query is greater than zero one would write f 0 results size gt There are three types of components within an expression constants e g integers characters strings variables and operators WebBase works from left to right in evaluating the infor
308. gn right prefix Parameter names are not case sensitive Supported parameters and their allowable values are described below Note Some of the parameters allow the user to insert spaces into a field align padchr etc Recall that browsers replace multiple spaces with a single space character except within the lt PRE gt lt PRE gt construct e align specifies the alignment of the field within the specified size area Valid values are left center right and currency If currency is specified the alignment is right justified and the numeric value is displayed with two decimal places and a comma character inserted for every group of three digits to the left of the decimal point Default value is left for strings and right for numbers e comma allows for redefinition of the comma character The default value is the comma character E e currency allows for redefinition of the currency character The default value is e decimal allows for redefinition of the decimal point character This is useful to change monetary values in which a comma should separate values instead of a decimal point The default value is the period character e encode specifies that the value of the variable is to be explicitly encoded in the same fashion as the browser automatically encodes its command string when sending it to the server Browsers encode the command string by 1 replacing all spaces with plus signs 2 encoding m
309. hange data in an existing row or rows either by adding new data or modifying existing data UPDATE General Usage Each UPDATE statement identifies the table in which the row s of data to be updated is found the field s to be updated the new values for the fields and possibly a WHERE clause to identify which particular records will be updated To update the NumOwners field for all the Cars in the table to 1 the following statement would be used UPDATE Cars SET NumOwners 1 More than one field can be updated at a time To update both the NumOwners field to 1 and also specify that all audio systems are AM FM the following would be used UPDATE Cars SET NumOwners 1 Audio AM FM WebBase User s Guide Often only one or a few records in a table need to be updated The WHERE clause is used to specify which particular records will be updated The format of the WHERE clause is exactly as described above for the SELECT statement and can include a single conditional or multiple conditionals using the AND and or OR operators To update the record created using the INSERT statement above UPDATE Cars SET NumOwners 1 Audio AM FM WHERE ID 4 UPDATE WebBase Usage The UPDATE statement when used within the sql macro is very similar to an explicit UPDATE statement as described above If the number of owners an audio type from the UPDATE statement in the preceding section were sto
310. hapter 11 Expressions 192 fileFullExtension e g f c nydir aSubDir nyFile text fileFullExtension gt text returns a new string containing the characters that follows the receiver s last period character This supports file extensions longer than 3 characters fileName e g f CmydinaSubDinmyFile txt fileName gt c nydir aSubDirnyFile returns a new string containing the characters of the receiver up to the last period character fileNameLessPath e g f CmydinaSubDirmyFile txt fileNameLessPath gt myFile txt returns a new string containing the unqualified file name of the receiver file name and extension without drive or directory path fileNamePath e g f c nydir aSubDirnyFile txt fileNamePath gt c mydir aSubDir returns a new string containing the directory path of the receiver path name without the file name and extension format e g set phoneNumber 1234567890 f 000 000 0000 phoneNumber format gt 123 456 7890 returns a new string in which any digits in the control string argument have been replaced with the next corresponding character from the receiver all other characters in the control string print as entered Processing stops when the end of the receiver or control string is reached There must be a good match between the receiver and control stream In the example shown above if the variable phoneNumber did not have an area code the string returned woul
311. he display at the end of this section shows the information displayed if there is in process mail e Status gt Show Stats if selected the number of messages that have been received in the mail queue the number that are currently being processed and the number of errors that have occurred while sending messages are displayed in the WebBase Mail Service Window as shown in Fig 16 6 below WebBase User s Guide 287 Chapter 16 E Merge 288 Figure 16 6 Figure 16 7 Mail Statistics Display ES WebBase 56 Mail Service 100 lines Al x File Edit Status 8 lt gt Mail stats In 1 In Process 1 Errors 0 Status gt Trace Mail Commands this is a toggle option that turns on trace information in the mail window By default this option is disabled If selected a check mark is displayed next to this option on the pull down menu If selected 1t shows each write that is done and the reply code received from the server The writes include things like HELO RECP TO DATA and QUIT replies are merely numbers like 200 OK The variable email Trace can be used to automatically enable or disable this feature by default it is disabled Status gt Full Trace this option is only active if the Trace mail commands option has been enabled If selected extensive trace information on each mail transaction is displayed in the WebBase Mail Service Window This includes the entire stream of information that 1s sent out all the send
312. he WebBase server will access the form stored in the file getname htf and use the information found following the 2 as parameters in the processing of the form The getname htf form that is accessed looks like this Figure 2 1 The getname htf form lt HTML gt lt HEAD gt sql to answers source aSrc user aUser password aPwd max 25 SELECT FROM Examples WHERE Name LIKE S name sql true sql if O answers size lt TITLE gt I m sorry lt TITLE lt HEAD gt lt BODY gt lt H2 gt Search results for search lt H2 gt lt HR SIZE 8 gt lt H2 gt I m sorry I could not find any records that match in the database lt H2 gt else lt TITLE gt WebBase Demo Results lt TITLE lt HEAD gt lt BODY gt lt H2 gt Search results for search lt H2 gt forRow aRow on answers lt HR gt lt PRE gt Name lt B gt Name lt B gt Company lt B gt Company lt B gt City lt B gt City lt B gt State lt B gt State lt B gt Zip Code lt B gt Zip lt B gt Ph lt B gt Phone lt B gt lt PRE gt forRow if lt BODY gt lt HTML gt There are three main sections in the form The section between sql and sql is the WebBase sq macro When the form is processed WebBase replaces name with Denny and then generates and performs an SQL SELECT statement to retrieve the first 25 reco
313. he above SQL statement we will come to this onError clause of the errorProtect macro Below we will extract the messageText from the error instance turn the Soutput back on and display that message text in the browser output which in this case will result in it being displayed in the WebBase WebServer window We will also explicitly return the word Error in place of the OK as done above comment set text Serrors messageText set Soutput true Error text return Error errorProtect We believe the above workaround is a reasonable solution for a problem that we hope will be fixed by a future ODBC and or Windows NT 4 0 Service Pack The added SQL macro keepHandle keyword will more than likely be removed in a future release of WebBase when it is confirmed that such a fix has been implemented and sufficient time has elapsed to allow our users to obtain and install the fix Too Many Client Tasks Error WebBase was designed so that database connections would be cached to improve performance When a sq macro is processed the ODBC connection cache is checked to see if 274 WebBase User s Guide there is a connection handle for the specified source and username If so the handle is reused If not a connection handle is created and then stored in the cache after the sql call is completed The following error may occur when caching is enabled ODBC API call connect returned the following
314. he argument key otherwise false Note that the argument must also be an association e gt e g f assoc2 assocl gt gt true returns true if the receiver key is greater than or equal to the argument key otherwise false Note that the argument must also be an association e between and e g set assoc3 Title Jocomment Association key value f assoc2 assocl assoc3 between and true returns true if the receiver is between the first and second arguments otherwise false WebBase User s Guide Note that the arguments must be associations and the comparison is done based on the keys key e g f assocl key gt Version returns the key of the receiver max e g f assoc2 assocl max gt Version gt 4 10 returns the maximum of the receiver or the argument min e g f assoc2 assocl min gt Build gt 56 returns the minimum of the receiver or the argument value e g f assocl value gt 4 10 returns the value of the receiver Association Class Operations The Association class is accessed using the Association WebBase variable This section describes all the operations that can be performed on the Association class key e g f Version Association key gt Version gt nil returns a new association whose key is set to the first argument the value is left as nil key value e g f Version version YoAssociation key value gt Version g
315. he current machine Cancel Apply Help There are three types of data sources that can be set up e User DSN A user data source is only visible to the specified user and only on the specified machine e System DSN A system data source is visible to all users on the machine including NT services e File DSN A file data source allows you to connect to a data provider File DSNs can be shared by users who have the same drivers installed For WebBase applications a System DSN is strongly recommended If WebBase is to be run as a service then any database must be set up using a System DSN Even if WebBase is not to be run as a service databases should be set up as System DSNs If a user DSN is used then only the user who created the DSN will be able to access the database If another user starts WebBase and attempts to access a database via a htf form errors will result since that user will not have access to the initial user s User DSN To demonstrate how to create a System DSN this section will cover the steps necessary to create and configure the source used to access the Cars Microsoft Access database used with the database examples accessed via the WebBase WebWizard To create a new System DSN press the Add button Figure 3 18 shows the display presented in which you are prompted to select the ODBC driver to use Select the appropriate driver and press the This data source is automatically set up as a Syst
316. he error will be returned to the user as are all other ODBC API errors WebBase User s Guide 275 Chapter 14 Database Issues This process does introduce some inefficiency in that WebBase is unaware of the fact that the requested data source requires the Jet database engine since all it has is the ODBC data source name user name and password values It does not attempt to interrogate the cached connections to see if they are Jet engine based ODBC driver connections Although it is possible for WebBase to be a bit more selective when clearing the cache 1t was felt that the above described implementation is a reasonable attempt to address a problem that in essence is associated with operating systems that Microsoft itself has obsoleted The net effect is to introduce additional disconnect and connect overhead only when triggered by the Too many client tasks error and not for every data source access as required when ODBC Connections Cache is totally disabled 14 5 Microsoft Excel Database Issues Microsoft Excel spreadsheets can also be accessed via WebBase and ODBC drivers However it s a bit more involved than with other databases Here s how to go about setting up ODBC access of Excel spreadsheets 1 You can only have 1 sheet in a workbook 2 The sheet must be set up so that row 1 contains all the field names rows 2 n contain the data records 3 Once you have your data set up select all the cells you want to consider as a
317. he number of minutes that the dictionary should be maintained in memory since last accessed accessed value This variable is initialized with the contents of the dynamic variable ouserExpires the default value of which is 60 minutes Setting this value to 0 will cause the dictionary and its contents to immediately be removed A form or set of forms can specify how long a user dictionary should be allowed to exist following the last access by setting this variable to an appropriate value For example setUser S expires 15 will cause the dictionary to be removed if it has not been accessed in 15 minutes Each time expires is set it updates the accessed variable also All of the above special variables can be read from the user variable dictionary but only the expires variable can be written using the setUser macro There is one other special user variable that is not written into the user dictionary as a result of its appearance in a setUser macro but that will have side effects on the maintenance of the dictionary e setUser remove dictionaryName tells WebBase to remove the dictionary named dictionaryName specified by a string constant such as myDictionary or as the value of a variable such as userName This is equivalent to setting this dictionary s expires variable to O except that it operates on a specifically named dictionary rather than on the current dictionary referenced by userName If
318. he same label is used on multiple branches with nested forIndex and forRow macros the first branch with the specified label will be branched to which may not necessarily be the correct branch To prevent this type of problem use unique labels Example 8 12 escape Macro forIndex anIxA from 1 to 20 label fool lt BR gt anIxA forIndex anIxB from 1 to 20 label foo2 lt BR gt anIxB if anIxB 5 escape fool if forIndex lt H3 gt Here is the next thing after foo2 lt H3 gt forIndex lt H3 gt Here is the next thing after fool lt H3 gt The above example would generate the following results Ua BABUN Here is the next thing after fool exit lt args gt The exit macro exits the entire htf form when encountered It can be used as an escape mechanism when for example your logic finds an error in the input data the user supplied It can be used within the onError clause of the errorProtect macro to exit the form after encountering an sql or other logic error Itis also very useful in verifying that a user is accessing a page only in a proper sequence or that they are authorized to access Itis very similar to the escape macro but exits from the entire form In essence it closes the stream that has been accumulating the output and returns what has been collected to the browser The exit macro takes optional arguments that specify arguments to be returned See the call and return macros for how return a
319. he using forRow macro to look at the information contained within each driver which includes the fields Data_Source_Driver and Data_Source_Driver_Attributes This operation is useful to obtain information that is to be displayed within a lt TABLE gt construct as in the WebBase WebWizard ODBC Viewer utility table source user password e g f Cars myAccess fred test DatabaseInfo table source user password OrderedCollection an OdbcRowObject returns an ordered collection containing OdbcRowObjects representing each field in the specified table and source This collection can be iterated through the using forRow macro to look at the information contained within each field This operation is useful to obtain information that is to be displayed within a lt TABLE gt construct as in the WebBase WebWizard ODBC Viewer utility tablesIn user password e g f myAccess fred test DatabaseInfo tablesIn user password gt WebBase User s Guide OrderedCollection OrderedCollection C HTTP WbWizard DBEx autos nil Cars TABLE nil OrderedCollection CAATTPAWbWizarADBExautos nil LogData TABLE nil return an ordered collection of database tables for the given ODBC source Each entry in the collection is another ordered collection containing the path of the database file owner qualifier the name of the table table type name qualifier e tableSource user password
320. hen write appropriate WebBase forms to determine if any messages need to be requeued after WebBase is restarted This is a good example of the type of functionality that can be included in a WebBase startup form E Merge Windows WebBase Mail Service Window The Mailer is the process within WebBase that manages the accumulation and sending of mail at the appropriate time The Mailer is represented by the WebBase Mail Service Window that displays some mail status information and has menu items to exit the mail process start and stop suspend the mailing of queued mail messages and flush the mail queue The WebBase Mail Service Window is displayed by selecting the Mailer option from the Edit menu on the WebBase WebServer Window The WebBase Mail Service Window is also automatically opened each time the Mailer detects that there is a mail message in the queue that needs to be sent An example of the WebBase Mail Server Window is shown below WebBase User s Guide 283 Chapter 16 E Merge 284 Figure 16 1 WebBase Mail Service Window ES WebBase 56 Mail Service 100 lines Al E File Edit Status 1 lt gt Service active as of Fri 11 Apr 1997 11 34 22 If the WebBase Mail Service Window is explicitly closed it will be reopened the next time a message is to be sent The sockets interface used by mail to send messages is internally connected to the WebBase Mail Service Window If the window is closed processing overhead is required to
321. hin the collection e g addFirst removeLast cannot be used on sorted collections The SortedCollection WebBase variable can be used with the general collection and ordered collection class operations described above There are no class operations specific to the SortedCollection class 11 15 Sorted Lists A sorted list is almost the same as a sorted collection All of the operations described for sorted collections apply to sorted lists There are no operations specific to sorted lists However an ordered list and a sorted list are the only WebBase data types that will return true to the isList operation In addition a sorted list is the only WebBase data type that returns true to the isSortedList operation WebBase User s Guide 201 Chapter 11 Expressions Sorted lists can be created in WebBase via the dynamic variables newAscendingList or newDescendingList Typically one would assign a list to a variable then send messages to that variable to manipulate the contents of the list as appropriate for the application Sorted List Class Operations The SortedList variable is used to create a new sorted list using the class operations described below The operations described above for general collection and ordered collection classes are also applicable for this variable e newAscending e g f SortedList newAscending gt SortedList returns an empty sorted list whose sort order for elements is ascending e newDesc
322. his field contains any information to be included as the Accept parameter passed with the message Details on this parameter can be found in Appendix C Location This field contains the location of where the message will be sent It can be in the form of www expertelligence com or a numeric address e g 127 0 0 1 WebBase Total View Text Window The text part of the WebBase Total View Window displays the results of creating and sending a message containing the selections made by the user to the specified location The address where the message is sent is presented at the top of the window broken down into host port and path Below this is the message that is sent Finally the WebBase Total View Window displays how many bytes were received and what the information was that was received back The results of selecting a GET command and sending it to www expertelligence com are shown below WebBase User s Guide Figure 5 21 WebBase Total View Window Showing Results ES WebBase 56 Total View Ot x Fie Edit Reload GET POST CHEAD www expertelligence com Addressing Host www expertelligence com Port 80 Path P Location Sending Msg GET HTTP 1 0 lt Cr gt lt Lf gt lt Cr gt lt Lf gt Receiving 7860 total bytes as HTTP 1 0 200 OK Message ID lt 117231205 3518930835 ExperTelligence com gt MIME ersion 1 0 5 5 WebBase Heartbeat Window The WebBase Heartbeat
323. his file does not have to exist When extensions are defined the WebExtns ini file must be located in the directory containing the WebBase application e g c webbase The same format is used in the WebExtns ini file as in the WebBase ini file shown above The following is an example of a WebExtns ini file Figure B 4 Example WebExtns ini file WebBase 4 10 WebExtns INI file htf text html Aliases For 16 bit systems the optional WebAlias ini file defines the aliases within the WebBase environment If aliases are not to be used then this file does not have to exist When aliases are defined the WebAlias ini file must be located in the same directory as the WebBase application e g c webbase The same format is used in the WebAlias ini file as in the WebBase ini file shown above The following is an example of a WebAlias ini file 302 WebBase User s Guide Figure B 5 Example WebAlias ini File WebBase 4 10 Alias file foobar foo bar Global Variables Global variables on Windows 3 1 and Windows for Workgroups are defined in the file WebVars ini This file is optional the user should create it only if global variables are to be defined The WebVars ini file must be located in the same directory as the WebBase application e g c webbase The same format is used in the WebVars ini file as in the WebBase ini file shown above The following is an example of a WebVars ini file Figure B 6 Example WebVars ini
324. his parameter be created and then logging be enabled or disabled via the WebBase Server window A new log file is created each day named Wbyymmdd log where yy year mm month and dd day For example WB970504 log is the log file for May 5 1997 These log files will contain one entry for each query made of WebBase and will contain information based on the LogFormat selected Details on each log format are included later in this section There are five LogFormat types supported by WebBase The LogFormat parameter 0 4 and the corresponding format type are shown below Extended Combined Log File Format Common Log File Format Extended Common Log File Format Default Extended Original WebBase EMWACS Log File Format Original WebBase EMWACS Log File Format OrRNWSEA l l The five logging formats and examples of each are presented below The example text file for each was generated by running the first two basic examples provided with WebBase WebBase User s Guide Common Log File Format LogFormat 3 The Common Log File Format is used by many of the commonly available Web analysis tools The text file containing the output in Common Log File Format is shown below Example 12 1 Common Log File Format 0 0 0 0 26 Mar 1997 08 02 32 0800 none Start_Log HTTP 1 0 0 0 0 0 26 Mar 1997 08 02 33 0800 none Pause_Server_ gt _paused HTTP 1 0 0 0
325. ht have considerable differences in implementation URL Uniform Resource Locator It can be considered a networked extension of the standard filename concept Not only can you point to a file in a directory but that file and that directory can exist on any machine on the network can be served via any of several different methods and might not even be something as simple as a file URLs can also point to queries documents stored deep within databases or whatever Web page A document or file written in HTML that provides instructions to browsers on how to format and display the text and graphics included in the page A Web page may include text pictures input forms and anchors Synonym Web document 2 2 A WebBase Example WebBase allows your readers to interact with your databases from a Web browser Since examples speak louder than words let s go step by step through a simple one Suppose you have a Web page with an input form that looks like this WebBase User s Guide Chapter 2 Introduction Please enter the name to search for Denny When the user enters the desired search name e g Denny and clicks on the Submit button a GET request is sent from the browser that looks like http lt host URL gt 80 getname htf name Denny This request is sent to the WebBase server at http lt host URL gt The server is configured to accept requests on port 80 so that is included as part of the address T
326. ia type in fields checkboxes radio buttons menu selections buttons etc It also includes information as to where the collected input is to be directed when the user is ready to submit his or her input IP Address An IP Internet Protocol address is a 4 byte number that uniquely identifies a host on the IP network This address consists of a network number which is always the same for every host on a network and a host number which must be unique for each host on a 6 WebBase User s Guide network IP addresses are assigned to each computer by appending a unique host number to the network number The first byte of an IP address determines the class of the network IP addresses are divided into Class A Class B and Class C network numbers The first byte of a Class A network is in the range of 1 127 and the network address is one byte in length The first byte of a Class B network is in the range of 128 191 and the network address is two bytes in length The first byte of a Class C network is in the range of 192 254 and the network address is three bytes in length For example 130 57 x x is a Class B Internet number because the network number is two bytes in length and the value of the first byte is between 128 and 191 When you assign an IP address to a device you can append any host number that is not already in use by another device The host number part of the IP address must be unique on the IP network At most sites a network ad
327. ic and do not have database files associated with them See also 70DBCsourcesHTML 140 WebBase User s Guide e ODBCsourcesHTML e g see below formats the information about the available ODBC sources for a nice printout on the browser as shown below See also ODBCsources Example 9 27 ODBCsourcesHTML display ODBC Sources 6 dBASE Files Microsoft dBase Driver dbf excell Microsoft Excel Driver xls FoxPro Files Microsoft FoxPro Driver dbf myAccess Microsoft Access Driver mdb Paradox Files Microsoft Paradox Driver db Text Files Microsoft Text Driver txt csv e o0s e g Windows 4 0 returns the operating system name and version as a string e output e g true a Boolean value that specifies whether output being generated by forms is added to the stream that is being constructed to go back to the browser The default is true Setting output to false stops all forms from outputting to the stream being constructed The variable is changed using set output lt true or false gt The lt true or false gt argument can be a constant variable or any expression that evaluates to true or false If the expression does NOT evaluate to a true or false the value of true is used without generating an error This variable should be used to limit the whitespace carriage returns line feeds returned to the browser Each carriage return encountered within a form is added to the outp
328. ied as part of the sq macro statement in case WebBase User s Guide 107 Chapter 8 Macros they are required by future ODBC drivers buffer Integer The maximum buffer length for ODBC to use to return data from the database to WebBase The default is 8192 bytes If one requests a record from the database and the buffer is not long enough some of the data will be truncated This is typically some text from a long memo field but it can be entire fields as the data is returned in the order requested SELECT field1 field2 field3 If field is by itself longer than the buffer the rest will be lost See the operations available for ODBCRowObject in Chapter 11 that include detecting if a message about data truncation was received cache Boolean If set to false the ODBC connection will not be added to the cache of ODBC connections after the operation and if previously in the ODBC cache will be removed as a side effect of the operation This parameter in no way affects the setting of the ODBC connections cache If caching is disabled this parameter has no effect Setting this parameter to true will not cause this connection to be cached if caching is disabled The value of the Cache ODBC Connections menu option set via the WebBase Service window always takes precedence The default is true which means the connection will be cached if caching is enabled This keyword value pair is useful to selectively keep a database
329. ierarchical representation of the complete System Registry hierarchy Because the System Registry contains many entries in its hierarchy the results are not presented here printHierarchyOn e g set strm String new WriteStream on f strm RegistrationDatabase printHierarchyOn gt RegistrationDatabase returns the receiver after appending a hierarchical representation of the complete System Registry hierarchy to the stream specified in the argument Because the System Registry contains many entries in its hierarchy the results are not presented here users e g f RegistrationDatabase users gt aRegistrationDatabase returns a new instance of the receiver corresponding to the HKEY_ USERS predefined key The keyName for top level registration databases is a number e g 2147483652 that uniquely identifies this top level RegistrationDatabase 11 34 HttpCommand 242 The cmd variable is an instance of HttpCommand that is created within WebBase to process the specific GET or POST request being handled Some of the WebBase macros and variables already described are directly associated with this command instance e g the browserAddress variable contains the IP address of the browser from which the GET or WebBase User s Guide POST was issued therefore each command instance will have its own browserAddress variable In addition to standard macros and variables that are tied to a given command instance there ar
330. if logging is enabled Note this record is always available by reading logRecord on cmd even if writing it to a file is disabled or was never enabled in the first place mime e g f cmd mime text html Returns the current mime type string If the user has set up a extension to process a command and return something other than the default text html mime type this would return whatever was set up name e g f cmd name gt a HttpGetN for httpcmd Returns the type of command created either HttpGetN HttpPost HttpHead or HttpError and the command name nextCookield e g f cmd nextCookield gt W14697403E161808318469B Returns the unique value as used in the default cookie that WebBase always generates and sends out to the browser to see if it can establish a cookie connection removeTimer e g f anld cmd removeTimer gt anHttpGet Removes the timer queue entry whose id is equal to the value of anld may be a constant integer or string or a variable name of a variable whose value is an integer or a string If no such timer queue entry is found no error is indicated If multiple timer queue entries have the same id value only the first such entry will be removed Entries are created and added to the timer queue using the timer macro search e g f Yocmd search gt argl abc AND arg2 1 This operation is now obsolete and is maintained for compatibility with forms developed under previous versi
331. iles for the given operating system and above selections will be installed onto the target computer All parameters are entered into the System Registry in HTTP_LOCAL_MACHINE SOFTWARE ExperTelligence Inc WebBase 4 10 During this process the progress bar shown in Fig 3 10 is updated to show the files currently being installed and how much installation work remains to be completed Figure 3 10 Installation Progress Bar Copying WebBase Application C WebBase WebB ase exe If you selected to have Program Manager Icons installed you will see a window created with the icons displayed within it The installation window is then displayed over the program gt Prior to build 56 all WebBase entries in the System Registry were in HTTP_LOCAL_MACHINE System CurrentControlSet Services HttpSQL Effective with build 56 only the NT service parameters are located in this key For users upgrading to build 56 or later from build 55 or earlier the first time that WebBase is started all information within the old WebBase location is copied to the new location The information in the old location is not deleted this action is left to each WebBase user 20 WebBase User s Guide manager window and Fig 3 11 shows the window indicating that the installation of WebBase was completed successfully Figure 3 11 Successful Installation Display WEB _Thenk you for uring WebBase ae Please consult our ho
332. imer macro timer id 3 time set var ESTL 3 2 54 sql comment any WebBase scripting here comment timer while lt exp gt while As long as exp returns true the while macro will continue looping and executing all the statements contained within the macro When exp returns false control passes to the first statement following the while The variable whileLimit can be created and set to a positive integer to limit the number of times one will loop regardless of the state of the condition This is useful as a safeguard during development to prevent infinite loops The local variable whileCounter is automatically set to the loop count e g 1 2 3 WebBase User s Guide 111 Chapter 8 Macros 112 The example below uses the while macro to wait for a given length of time before processing will continue The variable pauseTime would be set before this macro is invoked and would contain an integer value identifying how many seconds to wait from the current time Example 8 47 while Macro set startTime Sseconds set stopTime pauseTime startTime set now startTime while now stopTime gt set Sprioritys 0 set now seconds if now startTime gt set stopTime 86400 stopTime if while with lt val gt with The with macro allows one to specify an sql result set that is to be made available for accessing via field names Unless one is within the forRow macro by defa
333. in the authentication window comment if Authorization cmd getVariable isNil set Authenticate User Verify else se ct Authenticate comment The authUserName and authPassword operations extract the username and password from the Authorization variable these are th ntries made by the user in the authentication process comment set thename Authorization authUserName set thepass Authorization authPassword t fe comment Check the database to see if a match was found The specific source user and password must be set up by each user site Note that the sql macro is wrapped within the errorProtect macro in case a problem occurs accessing the table of usernames and passwords The specific action to be taken is site specific in this case the user is redirected to the form error htf which may simply indicate that the site is currently unavailable comment errorProtect sql to results source users user db_username password db_password SELECT FROM USER_TABLE WHERE USER_NAME thename sql true AND USER_PWD thepass sql true sql onError reDirect error htf errorProtect comment Use the case macro to determine the next form based on whether the user entered a valid username and password comment case results size match 0 comment User does no
334. ing returns a new string in which all of the embedded comments in the receiver have been deleted A comment is indicated by double quotes rejectControls e g f a tab and cr and another tab rejectControls gt a tab and cr and another tab returns a new string representing the receiver with all of the embedded control characters replaced by space characters multiple contiguous controls being replaced by a single space rejectHTML e g f Here is an HTML lt INPUT gt statement rejectHTML Here is an HTML statement returns a new string in which all of the embedded lt HTML gt tags in the receiver have been deleted removeString e g f Hi Hi there removeString gt there returns a copy of the receiver with the argument removed removeStringlgnoreCase e g f hi Hi there removeStringlgnoreCase gt there returns a copy of the receiver with the argument removed Note that the case of the receiver and argument do not have to match replace with e g f 2 hE Hello replace with gt hEllo returns the receiver after replacing the number of characters specified in the first argument with the characters in the collection in the second argument replaceCharacter from to withString e g f 1 1 5 Xx Hello replaceCharacter from to withString gt HeXxXxo extracts the substring between the starting and ending positions Replaces any occurrences of the speci
335. ing Cachaca 269 SOL Protect usine Global Variables cia titi ita 270 14 3 SQL Selects amp Timing coi rie 271 14 4 Microsoft Access Database ISSUES cccessssceeesseceecseceeeessneeccssneeecesaeeeeseeaeeecseaaeeeessaeeeeeseaseeteeaees 271 ODBC Driver Bus Workaround eiii a a e a e aeae a i eia ias 271 Too Many Client Tasks AAA RO 274 14 5 Microsoft Excel Database Issues ccsccccesesccecesenceeceececeeseaeeceesnaeeecesaeecessnaeeecsenneeeseeeeeesseaeeeseeaees 276 14 6 FoxPro Database ISSUES e a a E E E leeds anladadesbigecdvanidia aE EEE ESEE EES 276 Chapter 15 WebBase Q amp A 278 Chapter 16 E Merge 282 16 1 Configuration snene onin e e e i p e a a i ari bended 282 E Merge Parameters A NN 282 viii WebBase User s Guide The Mal Lo ida ia ob ces 283 Shutting Down WebB ase AEA EA EE A E t 283 16 2 E M rge Windows isis iaa a ti 283 WebBase Mail Service Window ias do 283 Men Options i tsesvcsuds Meseveaiastationssgsiaseavbittanscouteslaceatinsssea lec eat load sascausestecendveseiasiacenalasbissnestea atone 284 WebBase Server Wind Wii lio capi lil cl ina 289 Men Opos ici la 289 16 3 WebBase Macros midi ad acid 289 Email lt ares gt Lal decidio aee eean Aaa a ti suet Tae a iae et 290 16 4 E Merge Variables anios ita dias 292 Dynamic Vartables cia a Re ha 293 Operational Variables iii lia 293 Special Variables donado tata 293 16 5 E Merge Operations indias 294 Mail Lists iia
336. input from the user before substituting such values into the sq macro can minimize the possibility of these types of errors occurring The above in house situation had a WHERE FIELD LIKE clause in its SELECT statement meaning any value in the FIELD column would satisfy the request If the form had required all input fields to contain values this error could have been prevented WebBase specifically identifies errors of this type as being ODBC driver database errors and provides the full query that was passed into the ODBC driver as part of the error message text If such errors are encountered the user should be able to better analyze such situations and redesign the queries where possible to avoid such error situations 14 2 Database Administration In many implementations of WebBase the database files will be accessed and updated primarily via forms developed for and processed by WebBase However there are occasions when it is necessary to edit the database directory or even completely replace the database file If ODBC caching is enabled this can cause error messages to be displayed to the user when they attempt to edit or replace the database Database administration is a very delicate operation and becomes even more so if it is to be done remotely If it is desired to replace the existing database file with a new one between the time that the database file is copied to your location any necessary editing changes made
337. insStringChecked CHECKED returns an empty string if the receiver does not contain the argument otherwise returns the string CHECKED This is useful for determining which check boxes on a form have been selected by a user e containsStringIgnoreCase e g f ELLO Hello containsStringlgnoreCase true returns true if the receiver contains the argument this method does a case insensitive comparison e decode e g f String 28Sample 29 decode gt String Sample returns a new string decoded from the receiver that was encoded as a browser would when returned as part of a lt Form gt lt FORM gt block e encode e g f String Sample encode gt String 28Sample 29 returns a new string encoded as a browser would when returned as part of a lt FORM gt lt FORM gt block e equals e g f hello Hello equals false returns true if the receiver and argument are equal when doing a case sensitive string comparison otherwise false This is the same as using e equalsIgnoreCase e g f hello Hello equalsIgnoreCase true returns true if the receiver and argument are equal when doing a case insensitive string comparison otherwise false e fileExtension e g f c Wnydir aSubDir nyFile txt fileExtension gt txt returns a new string containing the three characters that follows the receiver s last period character WebBase User s Guide 191 C
338. installation is whether the Uninstall option will be installed as shown on the dialog below This utility can be used to uninstall all of the WebBase product components Figure 3 15 Custom Installation UnInstaller Option Install Uninstaller Ed Do you wish to install the Uninstaller This utility will allow you to uninstall all product components if you so choose The remainder of the custom installation is the same as described above starting with the definition of the WebBase parameters 3 5 Updating WebBase From time to time updated minor releases of WebBase will be made available on the WebBase Web site A build number identifies these releases For example the release occurring after build 56 will be build 57 The version number identifies major releases and may require a full re installation of WebBase To upgrade your version of WebBase download the WBUpdate exe file from the WebBase Web site This file will install the set of application files that contains any improvements to WebBase The WBUpdate exe file is provided as a smaller file that reduces the amount of time required for downloading However it does just update the WebBase application and not any of the associated applications If changes have been made to any of the tools and utilities provided within the WebBase WebWizard a full installation must be performed in order to install these updated forms To start the upgrade process double click on
339. ints to your local system If you have set up the hosts file on your system to assign the name localhost to the 127 0 0 1 IP address you may also substitute localhost as the address e lt your port number gt is the port number you defined as your PortNo parameter e dateTime is the built in WebBase command The dateTime query will return your server s current date and time in local format Date Tue 06 May 1997 09 07 12 PDT If all appears as described here your WebBase application is working At this point it is strongly recommended that you visit the WebBase WebWizard to find out about all the features of WebBase You ll also need to review the information presented later in this chapter about ODBC driver installation Built in Commands WebBase includes a number of built in commands that can be sent from a browser These commands are listed on the WebServer window that is displayed within WebBase These commands are useful for determining whether WebBase is working after an installation 26 WebBase User s Guide The built in commands are almost equivalent to simple htf files For example one of the built in commands is dateTime that displays the current date and time It would be very trivial to create a htf file that performed the same function However if a htf file has been created with the same name as a built in command the htf file will take precedence over the built in command If a user had created
340. ion is executing from If you have a version of WebBase currently executing and you wish to install one or more WebBase components into the same directory that the current version resides in you are STRONGLY URGED to Abort this installation process now stop the currently executing WebBase application then re execute this installation program Before WebBase can be installed onto your system you need to read the WebBase License Agreement A copy of this agreement is found in Appendix A in this manual This agreement is also in the License wri file placed into the directory containing the WebBase application Figure 3 3 WebBase License Agreement WebBase License Agreement Ed WebBase TM Software License Agreement This agreement is a legal contract Please read it carefully before installing your copy of the WebBase software Completion of the installation process indicates acceptance of the terms of this agreement Upon acceptance of the terms of this agreement you are hereby authorized to receive and use a single copy of the computer software package known as WebBase the Program which includes 1 object code computer software and 2 related end user documentation All right title and interest in and to the Program is retained by ExperT elligence Inc Company and is disclosed to you only for use in accordance with the terms of this agreement Press OK if you agree to these conditions press Abort to abort the
341. is all the software you need to connect your database to the web No other software is required WebBase is ODBC compliant WebBase works with any ODBC compliant database including ORACLE Sybase SQL Server and MS Access Rh WebBase User s Guide Chapter 1 What is WebBase Easy automatic install You can have a web server running in minutes WebBase uses all the features of HTML versions 1 2 and 3 WebBase WebWizard SQL statements of arbitrary complexity can be embedded anywhere in HTML documents A full featured macro language including if case forRow forIndex statements as well as math logic comparisons string manipulation dates and more functions WebBase works with ALL Browsers and extensions and Internet file types including JAVA Utilities and tools to help you get started with WebBase including setting up example web sites No programming of ugly scripts You can use SQL to populate pop ups fill lists insert new data and embed arbitrary SQL SELECT JOIN UPDATE INSERT and DELETE The possibilities are endless No CGI code Your Web pages are easily maintainable WebBase directly reads data in all Internet You can include JAVA movies virtual file formats HTML pictures etc in your Web pages An insert facility for easy maintenance Re use of forms saves time and keeps you better organized User defined local and global variables You can store temporary state
342. ise false align e g f 5 abc gt abc returns a new string containing the receiver and enough blanks necessary on the right to pad it out to the number of characters specified in the argument If the total number of digits is more than the specified field width argument the returned string will be truncated alignDollar e g f 5 123 alignDollar gt 123 f 8 123 45 alignDollar gt 123 45 returns a new string representing the receiver as a dollar amount If the total number of digits plus the sign are more than the specified field width argument the returned string will be truncated alignLeft e g f 5 abc alignLeft gt abc returns a new string containing the receiver and enough blanks necessary on the right to pad it out to the number of characters specified in the argument If the total number of digits is more than the specified field width argument the returned string will be truncated WebBase User s Guide e alignLeft fill e g f 5 4 abc alignLeft fill gt abc returns a new string containing the receiver and enough fill characters specified in the second argument necessary on the right to pad it out to the number of characters specified in the first argument If the total number of digits is more than the specified field width argument the returned string will be truncated e alignRight e g f 5 abc alignRight gt abc returns a new string containi
343. isplayed However it is also possible to create variables using command line arguments or field names Database fields with the same name as a reserved work can be used by enclosing the field name in double quotes A general rule of thumb is to take great care in selecting any variable name See also reservedWordsHTML reservedWordsHTML e g see below formats the list of WebBase reserved words for a nice printout on the browser as shown below See also reservedWords Example 9 30 reservedWordsHTML display Reserved Words 89 ascending call case with writefile yes yourself e results e g a default variable into which the sq macro places its results if a to keyword value pair is not included returns e g OrderedCollection the values returned by the last return macro This is equivalent to f cmd returns WebBase User s Guide e rightBrace e g returns the right brace character This is provided should you wish to display a character in your htf form and not have WebBase interpret it as the closing character of a macro or variable construct It is similar to the HTML amp gt sequence Setting this name with the set macro will change what is returned for the duration of the containing htf form but will have no effect on the fact that WebBase will still interpret the character as a special character used to close macro and variable fields within an htf form The brace
344. iteStream return a new instance of the receiver stream class whose contents are the argument a collection 11 27 Read Streams A read stream allows streaming over an indexed collection of objects for read access but not write access Read Stream Instance Operations All of the operations described above for streams can also be performed on read streams The following operations are specifically for read streams e next e g f c Nittp wbwizards default htf File pathNameReadOnly next gt returns the next object accessible by the receiver and advances the stream position If the receiver is at the end returns an error Read Stream Class Operations The ReadStream variable represents the ReadStream class which can use the stream class operations described above There are no class operations specifically for this class 11 28 Write Streams A write stream allows streaming over an indexed collection of objects for write access but not read access Write Stream Instance Operations All of the operations described above for streams can also be performed on write streams The following operations are specifically for write streams Write streams are particularly useful for concatenating a large number of strings together Although the same result can be achieved with the operator it is more efficient to create a write stream on an empty string add in all of the desired strings and then use the contents of the
345. ith the arguments provided via the command line newArg gt 13 WebBase User s Guide e transactionsMaxLines this variable defines the number of lines of information to be displayed in the WebBase Transactions Service window By default 100 lines are displayed If transactionsMaxLines is created as a global variable with a value between 10 and 10000 this defines how many lines will be displayed in the window More information on the WebBase Transactions Service window can be found in Chapter 5 e transactionsWindow this variable determines whether a WebBase Transactions Service window is opened when WebBase is started By default the window is not opened If transactionsWindow is created as a global variable with a value of true the window will be opened each time WebBase is started Note that if WebBase is started as a service under Windows NT no windows may be displayed More information on the WebBase Transactions Service window can be found in Chapter 5 e updateStats If set to false disables the Transactions Pane the one line band just below the menu bar in the server window If the updateStats variable is not defined or is set to true this pane will display the command counter and most recent command line The user can enable disable this pane via the Transactions Pane menu item in the server s Options menu Providing a global variable updateStats set to false will cause this pane to initially come up as
346. ith the same user password combination If a change to ODBC connection caching is made using this menu option it will stay in effect until WebBase is stopped The variable cacheODBC should be set to make any persistent change to whether ODBC connection caching will be used Figure 5 14 Cache ODBC Connections Confirmation Dialogs Please Confirm f gt Enabling ODBC Cache will 2 retain ODBC connections to improve query speed Please Confirm 2 Disabling ODBC Cache will cause ODBC connections to be reestablished every query Disable ODBC Cache Enable ODBC Cache Enable Log File This is a toggle on off option If logging is enabled default a check mark is displayed next to the menu option If logging is disabled no check mark is displayed If this option is selected one of the confirmations shown in Fig 5 15 is displayed The dialog on the left is displayed if logging is currently enabled the dialog on the right is displayed if logging is currently disabled If this option is selected log files will be generated for each WebBase transaction if a user has also defined a LogDirectory as a WebBase parameter If logging is enabled a log file is created each day to record each query made of WebBase See Chapter 12 for details on logging and log file formats If this option is disabled log files will not be generated If a change to logging is made using this menu option it will stay in effect until WebBase is stopped The v
347. its internal cache to ensure it is using the latest version of the form This variable is only used if cacheEnabled is true During forms development setting this variable to true helps ensure developers are always seeing the most current form they need not be concerned whether the form they are editing has already been cached or not During production however disabling this feature improves throughput as WebBase will not have to do any file modification date determinations cacheODBC e g true a Boolean value which defaults to true that indicates that ODBC connections are to be cached within WebBase Each sq macro request specifies a source name user name and password The username and password default to empty strings if not explicitly specified An ODBC database connection is made using the source name and user name If cacheODBC is true the connection is cached If a subsequent sq macro specifies the same source name and username the connection in the cache is used and a new connection is not created This can significantly reduce the amount of time it takes WebBase to process a request for the second and subsequent reference to the same source and username See Chapter 12 for more information on ODBC caching logEnabled e g true indicates that the log file functionality of WebBase is to be enabled If a global or local variable sets this to false logging will be disabled Logging can be temporarily enabled or disable
348. its of the year e g 97 Every occurrence of a single y or multiple but not 2 yyyy s lowercase y will be replaced by the four digit value of the year e g 1997 subtractDate e g set datel 2 10 97 asDate f datel date subtractDate gt 36 returns the number of days between the receiver and the date specified in the argument subtractDays e g f 20 date subtractDays gt 02 26 97 returns a new date that is n number of days before the specified date year e g f date year gt 1997 returns an integer specifying the year Date Class Operations The Date variable allows the Date class to be accessed This class has many useful operations to create compare and compute dates 212 calendarForMonth year e g f April 1997 Date calendarForMonth year gt lt see below gt returns a string containing the formatted calendar for the month whose name is the symbol specified in the first argument and the year is specified in the second argument The results of the above example are WebBase User s Guide Sd eS 90 02 TL 12 13 14 15 16 17 18 19 20 21 22223 24 25 26 27 28 29 30 e dateAndTimeNow e g f Date dateAndTimeNow gt 03 18 97 02 03 27 PM returns an array containing two elements a date representing the current date and a time representing the current time e day month year e g f 25 5 97 Date day month year gt 05 25 97 returns a new date defined by
349. keys specified in steps 5 8 will exist as long as the user selected to update the System Registry with the WebBase parameters entered during installation If any of these keys are not found select the Add New Key anchor and enter the appropriate key name Then proceed with the subsequent steps 38 WebBase User s Guide 9 To add a new parameter select the Add new entry anchor and specify the parameter name and desired value Remember that the parameter name is case sensitive 10 To modify a parameter select the Edit anchor next to the parameter and specify the changed value 11 Stop and restart WebBase so that the new modified parameters will take effect 4 2 Extensions The user can specify how WebBase will handle different types of files based on the file extension There are three options for how a file will be handled by WebBase 1 Process the file and return the results to the browser 2 Do not process the file just return the file contents to the browser 3 Return a 404 File Not Found error even if the file truly does exist This is used for hiding files that one wants to have associated with the files invoking them but ones that make no sense for a user to try and address directly from a browser In addition to specifying whether the file will be processed or just returned by WebBase the user also specifies the mime type This is used to generate the Content type header variable returned to the
350. lation process In an initial installation of WebBase it is not necessary to make backups as there are no files to back up Figure 3 6 shows an example of the dialog invoked by the Browse button Figure 3 6 Example Browse Dialog Destination Directory Ea Select the Destination Directory for installing WebBase program files To change the selection use the browse list below Press OK to return the value displayed press Cancel to return without a value Destination Directory Help an YY ase WebBase E backup c willie x Cancel Abort The drive selector at the bottom of the dialog and the directory listing in the center can be used to select an existing directory as the desired selection or you can type a directory into the text editor field above the directory list area Clicking the OK button returns the value in the text edit field while clicking on the Cancel button returns no value and therefore leaves the calling dialog s field unchanged Due to potential problems in some Windows 95 environments this directory must be at the top level for the application to execute under Windows 95 WebBase User s Guide 17 Chapter 3 Installation Parameter Definition After the directory information has been entered the WebBase initialization parameters must be defined and stored into the System Registry Figure 3 7 shows the dialog that prom
351. le 8 23 parallel Macro parallel fork set varl any general WebBase stuff here Could be SQL calls maybe ones that reference databases on a remote machine fork another set of WebBase macros etc again possibly SQL fork and yet more parallel reDirect lt url gt The reDirect macro causes a redirect instruction to be sent to the browser the argument is sent as the new location Most browsers will automatically access the new location Some browsers may display a link to the new location All htf form processing stops when a reDirect macro is encountered and any reply data accumulated at that point is replaced with the redirect information WebBase User s Guide 97 Chapter 8 Macros The url argument is required and can use any of the following formats e file htf or subdir file htf The file string is relative to the Directory parameter The resulting URL will be http lt server IP address gt lt port gt file string e file htf or subdir file htf The file string is relative to the directory of the current form The resulting URL will be http lt server IP address gt lt port gt lt current location gt file string A variation on this format is file htf For each sequence one moves up one level of directory from that in which the form doing the reDirect was located However it is NOT possible to move up in the directory struct
352. le of the same name or a local variable for the specific form If the value is set to 1 the Expires parameter will not be set If the value is set to 2 the Expires parameter is set to 12 00 01 on January 1 1900 The time used to set the Expiration is that of the server system The browser s clock may differ slightly or substantially from that of the server In order to ensure that a form is expired setting expire to a value of 2 is recommended Experience with most current browsers shows this expiration is honored for pages that were accessed via POST requests and not those acquired via GET requests See Chapter 12 for tips on how to handle browser side caching of forms filler e g returns the space character and is used as the default pad character when specifying a size lt nn gt parameter tag within a variable display e g varname size 7 form e g test htf returns the current form name This is equivalent to f cmd path formDirectory e g wbwizard returns the name of the directory in which the form specified in the URL is located Within this form additional files may be inserted using the insert macro These insert files WebBase User s Guide may be in other directories The formDirectory is the directory of the main form not the inserted form A backslash character is always included at the end of the value FORMScache e g Dictionary cNittp test htf gt an OutputForm cNhtt
353. led an identical record will be written to the log file The actual format of the logRecord and the data written into the log file is determined by the LogFormat parameter LT e g lt returns the less than lt character milliseconds e g 61480122 the time in milliseconds from the previous midnight as returned by the operating system This value is accessed from the operating system each time the variable is referenced and will therefore change during the processing of the form Joname e g WebBase returns the product name string NEQ e g returns the not equal to sequence of characters newAscendingList e g SortedList returns a new sorted list object into which added elements will be sorted into ascending order WebBase User s Guide e SonewDescendingList e g SortedList returns a new sorted list object into which added elements will be sorted into descending order e newList e g OrderedList returns a new list object into which added elements will be maintained in the sequence in which they are added to the list e nextCookield e g W14264278E161808318467B returns a string similar to the WebBaselD that is used for initial interactions with the client browser This variable is useful when the form developer wants a unique string that can be used as the name of the user variable dictionary See Chapter 10 for more information on user variables e F amp NGT amp e g
354. ll these files potentially available to browsers accessing your system with WebBase The License parameter specifies the value of your license number This parameter is required and must be entered here If you do not have a license number contact sale Oexpertelligence com Appendix B describes parameter specification for 16 bit systems 18 WebBase User s Guide The errorLogFile parameter specifies the name of a file that WebBase can create and write error messages into These messages can be helpful in diagnosing problems you might encounter while WebBase executes The file need not exist at this time but the directory specified must exist before executing WebBase so the file can be created as specified By default the error log file is stored in the directory containing the WebBase log files The LogDirectory parameter specifies where in your local directory structure WebBase can write log files WebBase creates a log file each day and records the requests it processes These files are written into the directory you specify here These log files can be used with web site analysis tools to acquire information about number of hits location of requests etc Details on logging are presented in Chapter 12 You can specify this Log Directory and still disable logging via the WebBase Options menu if so desired You cannot enable logging however if you have not specified a Log Directory here The Default parameter specifies the name of a
355. llow the installation process to update the registry parameters during a new installation Completing the Installation After the WebBase parameters are defined the installation process continues by asking whether program manager icons should be created Creating icons will allow you to conveniently execute these programs In addition the installation process will create an Uninstall icon in the Program Manager Group you select to allow you to conveniently remove all the components installed during this process should that be necessary in the future Figure 3 8 Program Manager Icon Creation Program Manager Ea Do you wish to install Program Manager Icons Help Abort WebBase User s Guide 19 Chapter 3 Installation If you select to have Program Manager Icons created Fig 3 9 shows the dialog on which can specify the desired name of the Program Manager Group in which the icon s will be created Figure 3 9 Program Manager Group Name Select Program Manager Group Ed Please select the Program Manager Group that you would like to place the WebBase icons into You can select from an existing group or create a new one Group Name Accessories Administrative Tools Common ANDE Microsoft SQL Server 6 0 Startup Following the specification of directories components WebBase parameters and Program Manager information the appropriate directories will be created as necessary and appropriate f
356. llowing the instructions earlier in this chapter If a global variable is created to override the value of one or more of these dynamic variables WebBase must be stopped and restarted for the change to take effect The values of these operational variables are only used at system startup The default value for each dynamic variable is shown in parentheses e 9 cacheEnabled e g true a Boolean value which defaults to true that indicates whether WebBase is to read forms from its internal cache Each form that is handled by the WebBase server is first parsed to build internal structures identifying the macros in use The form is then processed and the results returned to the browser When a form is identified in a URL WebBase checks to see if JocacheEnabled is true If so it checks its internal cache to see if the form has already been processed If so the internal structures are re used This can significantly reduce the amount of time it takes WebBase to process a request for the second and subsequent reference to the same Web page since only the process step and not the parsing step has to be completed For production systems it is strongly recommended that this variable be left in its default mode which is true WebBase User s Guide 147 Chapter 9 Variables 148 cacheTimeCheck e g true a Boolean value which defaults to true that indicates whether WebBase is to check the file date of its forms against the file date stored in
357. lopment and testing can continue WebBase User s Guide 269 Chapter 14 Database Issues 270 There are also occasions when a production database needs to be modified This is more difficult to handle since it is not possible to control who is attempting to access a web site The code in Figure 14 1 can be used to provide forms based control of caching This form would be executed to turn off caching and clear the cache Any necessary database modifications would be done Then the form would be re executed to turn caching back on Figure 14 1 Example forms based database updating code Display the state of the ODBC cache upon entry ODBC Cache state before cacheODBC Display the contents of the ODBC cache SODBCcacheHTMLS A Toggle the state of the ODBC cache setGlobal ScacheODBCS ScacheODBC not Clear the cache Toggling the state only sets a flag it does not remove any existing connections f scmd clearOdbcCache Force the menu items under the WebBase WebServer Option s menu to agree with the current state of caching The cache flag was changed above but this does not cause the menu item to be updated f Scmd cacheMenultemCheck Display the new state of the caching flag ODBC Cache state after cacheODBC Should display that the cache is now empty SODBCcacheHTML It is strongly recommended that forms such as these be protected
358. lphaNumeric gt true f isAlphaNumeric gt false returns true for the characters for letters a through z A through Z and digits 0 through 9 otherwise false e isDigit e g f X isDigit gt false f 2 isDigit gt true returns true for the characters for digits 0 through 9 otherwise false e isLetter e g f X isLetter gt true f 2 isLetter gt false returns true for the characters for letters a through z and A through Z otherwise false e isLowercase e g f x isLowercase gt true f X isLowercase gt false returns true for the characters for letters a through z otherwise false This may also be written as isLowerCase e isSeparator e g f space isSeparator gt true f X isSeparator gt false WebBase User s Guide 207 Chapter 11 Expressions returns true for the characters for Space Tab Carriage Return Line Feed and Form Feed characters otherwise false isUppercase e g f X isUppercase gt true f x isUppercase gt false returns true for the characters for letters A through Z otherwise false This may also be written as isUpperCase isVowel e g f X isVowel gt false f A isVowel gt true returns true for the characters a A e E i I o O u and U otherwise false isWhitespace e g f space isWhitespace gt true f X isWhitespace false returns true for Space or control characters otherwise false max e g f A X max gt X
359. lse isCollection returns true if the receiver is a collection otherwise false Note that strings dictionaries and lists are types of collections isDictionary returns true if the receiver is a dictionary otherwise false WebBase User s Guide 169 Chapter 11 Expressions 170 isDirectory returns true if the receiver is a directory otherwise false isFloat returns true if the receiver is a floating point number otherwise false isFraction returns true if the receiver is a fractional number represented as n m otherwise false isInteger returns true if the receiver is an integer otherwise false isList returns true if the receiver is a list otherwise false isNil returns true if the receiver is non existent use this to test for a non existent variable or field isNull returns true if the receiver is non existent or if it is a collection e g string list or dictionary and does not have any contents isNumber returns true if the receiver is a number e g integer fraction float otherwise false isPoint returns true if the receiver is a point otherwise false isSortedList returns true if the receiver is a sorted list otherwise false isStream returns true if the receiver is a stream otherwise false isString returns true if the receiver is a string otherwise false isSymbol returns true if the receiver is a symbol otherwise false notNil returns true is the receiver exists equivalent to isNil
360. lt WebBase directory e V32BAS820 dll V32THK20 dll V32U202 dll V32VM20 dll DLLs required by WebBase e V32VM20 exe the Virtual Machine code used by WebBase exe e WebBase exe the WebBase executable application e WebBase ico the WebBase icon e WebBase bmp the WebBase splash screen e WebBase bat a batch file used to start WebBase on Windows NT 4 0 systems only e License wri the Software License Agreement for using WebBase e Install log the results of the installation This file must be maintained for use by the WebBase uninstall utility e WebSvStart bat a batch file used to start WebBase as a service under Windows NT This file is only created on Windows NT systems e WebSvStop bat a batch file used to stop WebBase as a service under Windows NT This file is only created on Windows NT systems e WebSvDel bat a batch file used to remove WebBase as a service under Windows NT This file is only created on Windows NT systems e Logs the subdirectory to contain log files This entry is specified during installation and is optional During the installation process you will be prompted for the name of the directory that WebBase will look at for forms including the WebBase WebWizard forms The default value for this directory is HTTP at the top level The WBSetup exe installation will place the following in this HTTP directory e YWbWizard this subdirectory contains the
361. lt file when a directory is referenced The defaults are default htf and default htm in that order This parameter can be specified as a single file name or as a Series of files to be searched for in the order presented index htm index html separated by commas If the parameter is specified with no filename then no default file will be used e Extension the default extension or extensions to append to a file name should the user enter what appears to be a file reference without an extension Defaults is htf htm in that order This parameter can be specified as a single extension or as a series of file extensions to be searched for in the order presented htm html separated by commas If the n Multiple domain support within the TCP IP configuration is currently only supported under Windows NT systems This is an operating system limitation not a WebBase limitation WebBase User s Guide 43 Chapter 4 Initialization 44 parameter is specified with no extension then no default extension will be appended to the file name to attempt to resolve it for the user HostName the DNS name identifying the domain This is used to generate the fullHostName and JoserverHostName variables if the browser does not provide a Host header variable The form designer can use these variables to do redirects using a DNS name instead of an IP address It is important to remember that this name is NOT being used for name resolution of the hos
362. lue is entered as 0 0 0 0 remoteHost the remote host IP number For general server entries e g Start_Log Quitting Stop_Log this value is entered as 0 0 0 0 request the request line exactly as it came from the client in the format method file httpversion The method could be GET HEAD POST or none The file contains the full file path and arguments of the requested file The file path is relative to the directory containing the WebBase forms The httpversion specifies the version number of the HTTP specification This will generally be HTTP 1 0 Extended Original WebBase EMWACS Log File Format LogFormat 1 The Extended Original WebBase EMWACS Log File Format is the same as the Original WebBase EMWACS Log File Format with the addition of a single extra value in each line This format is not compatible with many of the Web analysis tools This format is provided for compatibility with previous releases of WebBase it may not be supported in future releases It is strongly recommended that the Common Log File Format Extended Common Log File Format or Extended Combined Log File Format be used The text file containing the output in Extended Original WebBase EMWACS Log File Format is shown below 254 WebBase User s Guide Example 12 5 Extended Original WebBase EMWACS Log File Format Wed 26 Mar 1997 08 26 56 0 0 0 0 0 0 0 0 Stark Log Wed 26 Mar 1997 08 26 56 0 0 0 0
363. lumnDashes 240 WebBase User s Guide printColumnNames 240 printField on 238 printFraction 174 175 printFraction decimalSeparator 175 printHierarchy 243 printHierarchyOn 242 243 printHierarchyOn indent 242 printHRecord 238 printHTMLTable 200 printInFormat twoDigitYear 212 printOn 171 printOn base 177 printOn base showRadix 177 printOn decimalSeparator 178 printOn inFormat twoDigitYear 212 printOn inFormat twoDigitYear dateSeparator 212 printOn withPicture 213 printOn12Hr 217 printOn24Hr 217 printPaddedTo 177 printPaddedWith to base 177 printPRETable 201 printRecord 239 printRounded 175 printStringRadix 177 printTable 201 printTHColumnNamesOn 239 printVHTMLTable 201 printVHTMLTable 201 printWithPicture 213 Proxy Authorization 309 publicKeys 242 0 Quitting WebBase 284 quo 175 quote 195 R radiansToDegrees 175 radix 177 radix showRadix 177 raisedTo 175 raisedToInteger 175 Range 309 readBuffer atPosition 226 readFrom 178 197 readFromFile 195 Receiver 10 165 reciprocal 175 Records 7 reDirect macro 97 reDirect2 macro 98 120 Referer 121 309 Registry Editor 304 WebBase User s Guide rejectComments 195 rejectControls 195 rejectHTML 195 Relational database 72 Reload 64 Reload Menu Option 64 rem 175 remove 229 Remove All User Variables
364. m Enabling Cache Read will look for output forms in cache and reduce file system access Enable Cache Read E No e Enable Cache TimeCheck This option is only active if forms caching is enabled This is a toggle on off option If time check caching is enabled default a check mark is displayed next to the menu option If time check caching is disabled no check mark is displayed If this option is selected one of the confirmations shown in Fig 5 13 is displayed The dialog on the left is displayed if time checking is currently enabled the dialog on the right is displayed if time checking is currently disabled If this option is enabled WebBase will check the date of any file in the cache to determine if a more recent version exists in the file system If a more recent version is found the newer version is displayed and cached Enabling this feature helps ensure developers are always seeing the most current form they need not be concerned whether the form they are editing has already been cached or not If this option is disabled the cached forms will always be used even if a more recent form exists in the file system During production it is recommended that this option be turned off as this will enable throughput If a change to time check caching is made using this menu option it will stay in effect until WebBase is stopped The variable cacheTimeCheck should be set to make any persistent change to whether time check
365. mORO colWidthOf gt 11 returns the column width of the field at the specified key argument e describeHTMLRecord e g f examORO describeHTMLRecord returns a string that displays a lt TABLE gt about the receiver The table shows the field name field size field type and value within the field The example presented with the OrderedCollection describe VHTMLTable operation uses this operation to display multiple tables one for each OdbcRowObject in the collection e describeHTMLRecord e g f Record 1 examORO describeHTMLRecord returns a string that displays a lt TABLE gt about the receiver The table shows the field name field size field type and value within the field This is the same as describeHTMLRecord but includes a title at the top of each table e fullHTMLRecord e g f examORO fullHTMLRecord gt lt see below gt returns the receiver in a lt TABLE gt lt TABLE gt format No title is added to the table The results of the example are WebBase User s Guide 235 Chapter 11 Expressions Example 11 7 fullHTMLRecord example ID 26 Year 92 Maker BMW Model 318 IS Cylinders 4 o Transmission 5 Speed Kind 2 Door Color Red Mileage 3000 Price 22900 0 Air true Cruise false Category P assenger Country European e fullHTMLRecord e g f Data Table examORO fullHTMLRecord gt lt see above gt returns a string represe
366. macro can also be used to add braces around strings e root e g c ittp the root directory for the particular domain specified in the IP address If multiple domains are in use each domain can have a different root directory If multiple domains are not in use this will be the same as rootDirectory e 9 rootDirectory e g c ittp the root directory for WebBase If multiple domains are in use each domain can have a different root directory If no root directory is specified for a domain it will default to the root directory for WebBase e rowCount e g 10 contains the value of the ODBC statement s row count field following the execution of the sql statement The value returned for this variable is ODBC driver dependent and is typically NOT provided as a result of a SELECT statement In general it does indicate the number of rows affected by NON SELECT sql statements INSERT UPDATE Again it is important to note that this field is very DRIVER DEPENDENT and users need to experiment with their particular ODBC driver to determine under what conditions this value is meaningful e 9 rowCounter e g 1 used by the forRow macro The forRow macro provides for a counter keyword argument by which the user may specify a variable to keep a count of the iterations through the loop If the user does not specify any counter variable the default rowCounter variable will be created and used to keep track of the row eleme
367. mail message mailTo e g f MailQueue first mailTo returns the value of the to field of the mail message mailCC e g f MailQueue first mailCC returns the value of the cc field of the mail message mailBCC e g f MailQueue first mailBCC returns the value of the bce field of the mail message mailFrom e g f MailQueue first mailFrom returns the value of the from field of the mail message mailSubject e g f MailQueue first mailSubject returns the value of the subject field of the mail message mailDate e g f MailQueue first mailDate returns the value of the send field of the mail message E Merge Examples The WebBase WebWizard includes several examples showing how to queue a message using E Merge as well as how to query the mail queue and delete messages from the mail queue WebBase User s Guide 295 Appendix A Software License Agreement WEB TE 36 Software License f S ExperTolligence apena A o reement 296 WebBase Software License Agreement This agreement is a legal contract Please read it carefully before installing your copy of the WebBase software Completion of the installation process indicates acceptance of the terms of this agreement Upon acceptance of the terms of this agreement you are hereby authorized to receive and use a single copy of the computer software package known as WebBase the Program which incl
368. manner that allows for continued operation of the server We have been able to reproduce some Protection Violation and GPF errors in house One particular way to generate the error was to request a very large amount of data be processed by the database in one case approximately 40 million records Although the specific sql macro specified a max of 10 records be returned the SELECT statement specified a WHERE clause that all the records in the database satisfied and an ORDER BY clause that requested the ODBC driver sort all these records before returning the first 10 results Detailed debugging of this situation determined that the Protection Violation that occurred was during the execution of the SELECT statement the ODBC driver was called with the indicated query and ultimately returned the Protection Violation In this case the database was simply overloaded WebBase User s Guide in trying to sort all the records in the database to be able to respond to the SELECT request and return only the desired 10 records WebBase itself has no concept of what is being requested by an sq macro the enclosed text 1s merely processed for WebBase variables and then passed to the ODBC driver Nor does it have any concept of the structure and size of the database being addressed Because of this WebBase cannot prevent such conditions that result in these ODBC driver and or database engine errors In some cases properly screening
369. mation in the expression If a constant is encountered it is put directly onto the stack If a variable is found the value of the variable is put onto the stack If an operator is found the receiver of the operator is retrieved from the stack it will be the last item placed on the stack If the operation has arguments the necessary arguments will be retrieved from the stack The result of the operation will be computed and placed onto the stack We will go through two examples of expressions in RPN notation to see how each of these types of components is handled The first example we will examine is f Shipping Total TaxRate When the expression is parsed from left to right and evaluated the following actions occur The information on the stack at each step is displayed in the right column WebBase User s Guide 165 Chapter 11 Expressions Example 11 1 Simple RPN Example The first component encountered is Shipping which is a variable so its value is placed onto the stack A Next is Total which is another variable its value is also placed onto the stack oa ek a gt The next component is the operator The top value on the stack is removed this is the receiver for the RE Shipping operation This operation requires one argument so the next value from the stack is removed ES Total Next is TaxRate another variable whose value is placed onto the stack The stack now contains three v
370. me Instead of having to have separate explicit SQL statements for each kind of car only a single statement using a WebBase variable is needed WebBase will replace the variable with its value and then perform the database query The sql true parameter is generally included with any WebBase variable that contains a string and is included in a SQL statement The value of a particular field must be clearly identified as part of any SQL statement including a SELECT statement Any text or memo field values must be enclosed in single quotes as shown above Date or date time field values must be enclosed in signs An example using dates is presented with the INSERT statement below Numeric values need no enclosing characters SELECT Join Statements Relational databases allow data to be related across tables the data does not have to be stored in each table Generally there is one field that contains data that is common to both tables In order to retrieve the information from both tables a table join is done The result of the table join is that selected fields from each table may be retrieved or all the fields from both tables may be retrieved To show how a join statement works another example table will be used This table is called Owners and contains the names and addresses of the car owners The common field between the two tables is ID in the Owners table and OwnerID in the Cars table Note that the name of the field does not h
371. me attributes and internal date time representation e formatted e g f txt dirl formatted gt OrderedCollection testfile txt O 03 21 97 03 25 46 a 578124599 returns a collection of arrays of file information for the receiver filtered using the argument e g TXT Each array has five entries file name size date time attributes and internal date time representation e freeDiskSpace e g f dirl freeDiskSpace gt 394625024 returns the number of bytes of free space on the disk containing the current directory not necessarily the receiver e fullDirName e g f dirl fullDirName gt CNhittp wbwizard returns a string representing the path name of the receiver including drive letter There is always a at the end e hasNetworkName e g f dirl hasNetworkName gt false returns true if the drive specifier is a string representing a network drive e g SRV ALIAS otherwise false WebBase User s Guide 227 Chapter 11 Expressions 228 hasSubdirectory e g f dirl hasSubdirectory gt true returns true 1f the receiver has a subdirectory makeCurrent e g f dirl makeCurrent gt a Directory on CNittp wbwizard returns the receiver after making it the current directory newFile e g f testFile txt dirl newFile gt a FileStream on testFile txt returns a file stream for the file named by the argument in the receiver directory If the file exists it will be remo
372. me page at E y O http www Experd elligence com WebBase Im for the latest news on the WebBase product line 1995 7 ExperT elligence Inc All Rights Reserved Many of the dialogs in the installation sequence have a Help button on them The following is an example of what one of the Help screens looks like Each Help screen is tailored to the particular dialog that invoked it and contains information that we hope is helpful in your understanding of the dialog within the installation process Figure 3 12 Example Installation Help Window Easy Install Easy Install will prompt you for the directory you wish to have the WebBase components installed in and whether you wish to make backups of any files to be replaced by this process It will then install all WebBase components required for the Operating System you are running under After copying the necessary files to your hard drive Easy Install will ask you about setting up the Parameters Registry Windows NT and or Windows 95 or WebBase INI file Windows and about creating Program Manager icons Custom Install Custom Install will query you for the directory into which you want the WebBase components installed as well as whether you wish to make backups of any files to be replaced by this process Following this you will be presented with a list of the 3 4 Custom WebBase Installation When initially installing WebBase it is strongly recommended that
373. me start and end expression format macros also have optional intermediate single expression macro forms that may exist between the beginning and ending macros such as the else clause within the if if range This is much like the lt LI gt within a lt UL gt lt UL gt range With the exception of the comment and output macros macros may be nested to any desired depth Note however that forms or variables within curly braces cannot be nested For example the expression if O variable will produce a syntax error the correct format is simply if 0 variable The WebBase macros are described below Some macros have required and or optional arguments Required arguments are explicitly indicated in the macro definition line Optional keyword value pairs are described in a table for each macro the keyword and value are always separated by a space Except for specific cases noted below any argument or value used in a WebBase macro can be a constant a WebBase variable or an expression An integer constant is a collection of the decimal digits with an optional leading or sign e g 12345 WebBase User s Guide 83 Chapter 8 Macros A string constant is a collection of characters enclosed in single quotation marks e g string constant Chapter 11 covers WebBase expressions Unless the only argument to a macro is an expression e g the f macro expressions within macros should be placed within parentheses e g
374. med by the first argument in the directory specified in the second argument the file stream allows only read access remove e g f c ittp wbwizard default xxx oFile remove File erase the file named in the argument rename to e g f c http wbwizard default htm c nttp wbwizard default xxx File rename to File rename the file named in the first argument to have the name in the second argument 11 25 Directories 226 A directory represents a disk directory with a volume string and a path name string Files are generally described in terms of a directory and a file name Directory Instance Operations The following operations can be sent to any instance of a directory An example directory dirl is used in the following descriptions It is generated using set dir c http wbwizard Directory pathName e g set dir2 c webbase Directory pathName f dir2 dirl gt false returns true if the argument and receiver are the same directory otherwise false WebBase User s Guide e create e g set dir2 cWmyNewDiA Directory pathName f dir2 create gt a Directory on CAmyNewDiN returns the receiver after creating a directory on the disk for it e drive e g f dirl drive gt C returns the disk drive letter of the receiver e drivePathName e g f dirl drivePathName gt CNhttp wbwizard returns a string representing the drive and path name of the receiver e
375. ministrator maintains and assigns IP addresses ISMAP Image An image displayed on an HTML page that has the ISMAP attribute set This attribute turns the image into a graphically active element in which the user can select regions of the image by clicking the mouse on them Clicking on different regions will cause the server to take different actions ODBC database A database is ODBC Open DataBase Connectivity compliant if it has an ODBC driver through which one can issue SQL statements ODBC provides an interface by which an application program can access any number of different databases via a common set of SQL statements The ODBC driver handles the conversion of the SQL statement to whatever format statement the specific target database recognizes Records A collection of fields in a database When one queries a database using an SQL SELECT statement one expects to have returned zero one or more database records that match the selection parameters in the SELECT statement Records can be updated using the SQL UPDATE statement or deleted using the SQL DELETE statement A new record is created using the SQL INSERT statement Splash Screen When an application starts up it will frequently display a logo identifying the name of the product and possibly some copyright or company information This screen is called a splash screen SQL a standardized query language used to access one of a number of databases which of themselves mig
376. modifying this dictionary will have no effect on the user variables active in WebBase This dictionary should be used for information only See also userVariablesHTML allUserVariables allUserVariablesHTML and allUserVarNamesHTML userVariableeHTML e g see below formats the user variables and their values for a nice printout on the browser See also ZYouserV ariables YallUserVariables allUserVariablesHTML and allUserVarNamesHTML Example 9 33 Z user VariableseHTML display User Variables W14263151E161808318465B 5 e SSaccessed3 03 10 97 04 42 26 PM e altered tru e SS created3 03 10 97 04 42 25 PM e SSexpiress 60 e UserToken UW14269116E161808318480B version e g 4 10 the program s version number as reported in the WebBase Server window title bar WHERE a string of the form WHERE xxx yyy AND The WHERE variable can be used in an SQL statement to identify a particular record or set of records based on command line arguments For each command line argument value pair the xxx specifies the name of the command line variable and the yyy specifies the value of the variable The advantage of the 7 WHERE clause is that it is not generated until actually used within the sql statement It is thus possible to modify the variables and values to be used in the 7 WHERE variable before it is generated For example users may want to ensure that a gi
377. mple file stream used in below is generated using set fstrm c http wbwizard default htf File pathName e file e g f fstrm file gt a File on default htf returns the file over which the receiver is streaming e flush e g f fstrm flush gt a File on default htf guarantee that any writes to the receiver are physically recorded on disk e pathName e g f fstrm pathName gt CNittp wbwizard default htf returns the complete pathname of the file over which the receiver is streaming 11 31 OdbcRowObjects 234 An OdbcRowObject represents a row of data returned via an sql macro SELECT request The OdbcRowObjects generated by the SELECT request are placed into an ordered collection that is stored in the WebBase variable specified in the sql macro An OdbcRowObject is very similar to an ordered collection since it contains the fields for the row that is represents An OdbcRowObject also can identify its associated OdbcRowHeader see below The example OdbcRowObject used in the following operations is retrieved from the database examples provided with the WebBase WebWizard The data is retrieved using this sql macro sql to answers source myAccess user fred password test SELECT FROM Cars ORDER BY Year DESC Price sql After the SELECT is complete the matching rows have been stored in the WebBase variable answers as OdbcRowObjects The first of these will be used set examORO answers
378. ms MAY require that behavior be consistent with the directives e Proxy Authorization allows the client to identify itself or its user to a proxy that requires authentication The Proxy Authorization field value consists of credentials containing the authentication information of the user agent for the proxy and or realm of the resource being requested e Range HTTP retrieval requests using conditional or unconditional GET methods may request one or more sub ranges of the entity instead of the entire entity using the Range request header which applies to the entity returned as the result of the request e Referer allows the client to specify for the server s benefit the address URI of the resource from which the Request URI was obtained the referrer although the header field is misspelled The Referer request header allows a server to generate lists of back links to resources for interest logging optimized caching etc It also allows obsolete or mistyped links to be traced for maintenance Example Referer http www webbase org default htf e Transfer Encoding indicates what if any type of transformation has been applied to the message body in order to safely transfer it between the sender and the recipient This differs from the Content Encoding in that the transfer coding is a property of the message not of the entity e Upgrade allows the client to specify what additional communication protocols it supp
379. n DIR_1 if DIR_2 isNull set DIR_2 DIR_3 else set DIR_2 DIR_3 DIR_2 if if DIR_2 SDirectory exists not f DIR_2 SDirectory create if forRow if return true DIR_ onError return false DIR_ error messageTextBasic errorProtect scope 102 WebBase User s Guide set lt var gt lt val gt The set macro creates a local variable whose name is specified by var and whose value is specified by val If val is an expression the value of var is set to the result of evaluating the expression The val argument may also be another variable name or a constant The variable created will be a local scoping variable if within a scope scope statement Local variables can be removed using the remove removeAll or removeLocal macros In the example below the first statement sets the variable counter to 3 The next statement sets the variable xxx to the value of the variable name The last statement sets the variable uName to the result of applying the asUppercase method to the value of the variable name Example 8 34 set Macro set counter 3 set xxx name set uName name asUppercase WebBase also allows for indirection when setting variables If the second argument is specified as myVar the first argument is set to the value of the variable myVar For example set counter 3 set oldCounter counter set newCounter oldCounter The first expression sets counter
380. n WebBase is installed Before WebBase E Merge can be used the user must specify several initialization parameters as described below E Merge Parameters As with the WebBase initialization parameters the WebBase E Merge initialization parameters are stored in the System Registry Adding in or changing the E Merge parameters will have no effect on a running WebBase application To effect a change for any entry you must stop and restart WebBase after editing the parameter The name of each parameter is case sensitive and must be entered exactly as shown below If a parameter name is entered incorrectly WebBase will not be able to access it or use its value The values for string input fields are not case sensitive The following are the required WebBase E Merge parameters They should be added to the System Registry following the instructions provided in Chapter 4 for adding or editing parameters LicensedFeatures a LicensedFeatures key is similar to the License parameter The License parameter enables WebBase the LicensedFeatures key enables different add on options within WebBase If you purchase a new add on option you will receive a new LicensedFeatures key that has to be installed WebBase E Merge or any other add on product will not work until the appropriate LicensedFeatures parameter is entered WebBase User s Guide 16 2 SMTP_Server identifies the host machine that is to process the mail you wish to send via WebBase E M
381. n apostrophe A little extra effort during form design will generate forms that are much more robust and less likely to have runtime errors suffix a series of characters that will be appended to the variable s value followed by one or more pad characters if the field requires padding WebBase User s Guide WebBase User s Guide 157 Chapter 10 User Variables WEB amp N Q User Variables ExperTolligence Chapter 10 The previous chapter described the general principles behind variables and how field variables local variables global variables and dynamic variables are used within WebBase forms This chapter describes an additional type of variable called a user variable and its intended use within WebBase Local variables provide the htf form author with the ability to obtain information from the user change information and return information to the user Local variables can be read and written by the form designer but their lifetime 1s the duration of processing of one form Global and dynamic variables have a much longer life span they exist as long as WebBase is up and running They can be overridden by a local variable but again this change is only for the duration of a single form The type of variable that is missing is one that can be both read and written by the forms designer and whose lifetime can span the processing of a series of htf forms e variables that could be set by one form and read
382. n be edited During installation Figure B 1 prompts for these parameters and creates the WebBase ini file in the Destination Directory 298 WebBase User s Guide Figure B 1 WebBase Parameters Dialog WebBase INI File Values WebBase requires the following Required parameters be set in the WebBase INI File before it will execute fixed parameiers AppDirectory webBase not editable Application Ca ebBasevwWebBase exe not editable Required parameters PortNo 8o Directory C HTTP errorLogFile C WwebBase LOGS WebE rror_log Optional parameters LogDirectory C WebBase LOGS Default Extension License Create INI File Don t Create INI File The PortNo parameter specifies which port WebBase will use to communicate with a browser This port must be unique within your Windows environment i e not assigned to another application The default value is set to 80 The Directory parameter specifies where in your local directory structure browsers can access forms via WebBase This directory location corresponds to a browser referencing http host address Placing a default HTF or default HTM file in this directory will cause WebBase to return that form if a browser references http host address The errorLogFile parameter specifies the name of a file that WebBase can create and write error messages into These messages can be helpful in diagnosing p
383. n of WebBase The warning screen that is displayed right after the welcome dialog Fig 3 2 reminds the user of these ramifications If you are currently running WebBase it is strongly recommended that you stop the currently executing WebBase application perform the update installation and then restart WebBase After the warning message and license agreement are displayed you are given the option of specifying where the updated WebBase files should be placed This dialog is very similar to the WebBase Directory dialog described as part of the initial installation except that the WebBase Directory is not specified Default values are displayed If the Destination Directory entered is different than that currently used the updated WebBase application files will be copied to the location but an error message will then be displayed indicating that one or more files required by WebBase cannot be located If Make Backups is checked the corresponding directory is used to backup files that would otherwise be overwritten during the installation process After this directory information is entered the updated files are copied to the appropriate directories and the update is complete 3 6 Testing the WebBase Installation 24 After completing the above installation steps you are ready to test the new or updated WebBase application Before you test an initial installation of WebBase an excellent way to ensure you have all the necessary TCP
384. n or program option that is used to access the ODBC Administrator For example on a Windows 95 system the 32 bit ODBC Administrator is started via the Start gt Program menu To set up an ODBC source start up the ODBC Administrator A window similar to that shown in Fig 3 17 is displayed The different ODBC driver packs available from Microsoft have each presented this information in a slightly different display format However the basic concepts described here are applicable to any ODBC source setup The ODBC Administrator screens displayed in this section are from Microsoft s ODBC Driver Pack 3 5 28 WebBase User s Guide Figure 3 17 ODBC Administrator Screen ODBC Data Source Administrator EE User DSN System DSN File DSN ODBC Drivers Tracing About User Data Sources ith dBASE Files Microsoft dBase Driver dbf Remove Excel Files Microsoft Excel Driver xls FoxPro Files Microsoft FoxPro Driver dbf Configure MS Access 7 0 Database Microsoft Access Driver mdb MS Access 97 Database Microsoft Access Driver mdb Paradox Files Microsoft Paradox Driver db Text Files Microsoft Text Driver txt cs v Visual FoxPro Database Microsoft Visual FoxPro Driver Visual FoxPro T ables Microsoft Visual FoxPro Driver the indicated data provider A User data source is only visible to you An ODBC User data source stores information about how to connect to and can only be used on t
385. n the description and example presented with the scope macro in Chapter 8 Header Local Variables When the WebBase server receives a request from a client the browser has added some information to the start of the request This information is called header information and includes some or all of the entries that are described in Appendix C This appendix includes the set of header variables defined by the HTTP 1 1 specification There may be additional header variables created and sent by a particular client browser application Each header entry is extracted and created as a local variable All of the header variables can be examined by looking at the headerVariables or YoheaderVariablesHTML variables The header variables which WebBase forms developers may find useful are e Host host portion of URL entered by user This can be used to provide different responses based on different host designations This is an alternative to multiple domain support e Referer this variable is only included when a page is displayed via an anchor redirect or lt FORM gt construct it is not provided if the user explicitly types in a URL It identifies the previous URL from which the current form was invoked e User Agent defines the browser in use Cookie Local Variables Cookies are a special type of header variable that are not supported by the current HTTP 1 1 specification but are provided by many of the main browser applicati
386. nd a firewall or network service provider talking to WebBase WebBase does not include any expiration information with the WebBaselD as a cookie when it is returned to the browser If the browser is cookie enabled it will return WebBaselD as a cookie variable until the browser is stopped When the browser is subsequent restarted and a connection established with WebBase the browser will not send out the WebBaselD since it was only memory resident WebBase will generate a new WebBaselD and return it to the browser on the first interaction The WebBaselD variable is often used in conjunction with user variables as described in Chapter 10 WebBase User s Guide 123 Chapter 9 Variables 9 3 Global Variables 124 WebBase can access a number of global variables when the server is started These variables differ from those defined within WebBase forms in that their values are set in the System Registry and not via an HTML GET or POST query These global variables can be overridden by local variables of the same name for the processing of the htf file in which the local variable is defined It is also possible to create change the value of or delete global variables in memory using the setGlobal and removeGlobal macros However the values for global variables will only be persistent when the variables and their values are defined in the System Registry Consider using global variables to define the source username and password required as p
387. nd this is what you are doing To process the file you must do an Open Location using a URL and not merely an Open File using the file pathname Also the Database Examples require that you have set up the Autos mdb database file to be accessible via ODBC see Chapter 3 for instructions on how to set up the data source username and password for this example How can I display images or pictures from a database WebBase does not currently support retrieving binary data from database fields As there are many people interested in being able to save and retrieve images the solution that we provide is to store the binary image information in external files in a defined location and then identify the location within the database field For example a local user or global variable could be defined such as WebBase User s Guide set imagesDir images This directory would be relative to the directory containing forms which is normally c http Within the database there would be a field to contain the location of the image file An entry in this field would look something like imagesDir JBOX3A GIF The curly braces are used to indicate that the imagesDir is a variable name When the record containing this field is retrieved the image can be displayed using lt IMG SRC f PictureField cmd asHTF gt The asHTF operation causes the imagesDir variable to be resolved into images Thus the source of the image to be displa
388. nd thus must be encoded when used within text fields WebBase provides operations on strings encode and decode just for this purpose In the last example above writing set templ temp encode call forml htf output false testField templ call or call forml htf output false testField temp encode true call would accomplish the desired result of having the text block within the variable temp encoded into a format that would essentially hide all the signs and newlines so as to not cause problems when the arguments are processed In the CALLed form the local variable testField would now have to be decoded to return it to its original state This can be accomplished by writing set testField testField decode at the top of the CALLed form The example of the call macro presented below is contained in 3 files These files also show examples of the exit macro when used with return variables as well as the return macro 86 WebBase User s Guide WebBase User s Guide 87 Example 8 5 The calling form call1 htf lt HTML gt lt BODY gt comment Assume variables UserId and Password were input and contain strings Check if the user id and password are valid in a specified id password database The valid routine returns three values lst true or false okay on the database access 2nd true or false if lst was okay this indicates that the user s id and password wer
389. nection to be re established the first time you switch from one mode of reference to the other If you consistently use the host name string or the host IP address or relative references recommended you should have no problems with cookie variables being received properly from cookie enabled browsers WebBaselD Variable When a browser that supports cookies sends a request to the WebBase server it includes any cookies that have previously been received from the server If the cookies sent to the browser by the server included an expiration date the cookies may be persistent on the browser If the cookies sent to the browser did not include an expiration date they are memory resident on the browser until the browser application is stopped WebBase attempts to maintain a link between a browser and the server using the WebBaseID variable WebBase automatically creates this variable for each request that is received from a browser that does not include the WebBaselD as an inbound cookie variable For browsers that do not support cookies WebBase will create this cookie each time it receives a request This behavior can be modified using the skipCookies or skipAutoCookies variables It is preferable to use the WebBaseID cookie variable instead of the browser s IP address to maintain a link between the user s browser and the WebBase server This is because a browser s address can change from one screen to the next when a user is sitting behi
390. ned by an sql call is used It is strongly recommended that field variables only be used within the forRow or with macros and that the forms developer not rely on the result set received from the last sql macro The following two examples show how to improperly use field variables as well as how to properly use field variables for multiple collections WebBase User s Guide Example 9 1 Incorrect use of field variables sql to cltnl source aSrc user aUser password aPwd SELECT FROM Tablel sql forRow aRow on cltn1 FieldVarl sql to cltn2 source aSrc user aUser password aPwd SELECT FROM Table2 WHERE ID FieldVar2 sql The following line will generate an error because only the field variables from the records in cltnl are accessible If not within the forRow macro this would work VarFromCltn2 forRow Example 9 2 Correct use of field variables sql to cltnl source aSrc user aUser password aPwd SELECT FROM Tablel sql forRow aRow on cltnl1 FieldVarl sql to cltn2 source aSrc user aUser password aPwd SELECT FROM Table2 WHERE 1D FieldVar2 sql with cltn2 first The following line will correctly display the field value VarFromCltn2 since the field variables for the recordSet of the with macro are now being processed Note that if FieldVarl were us
391. newlines might not always represent argument list formatting information however as in the following WebBase User s Guide 85 Chapter 8 Macros Example 8 4 Arbitrary Text String set temp this is an arbitrary text string it may contain carriage returns and line feeds and it might also contain expressions like variable some valu that one wishes to pass to the CALLed routine as a text block and NOT as a collection of argument value lines call forml htf output false testField temp call In the above example the call macro would attempt to interpret the text between the call call statements as argument value lines which would result in either errors or premature termination of the argument structure with undesired arguments and values being passed Arbitrary text including signs and or newlines may be passed as the value of an argument by the call macro In this case the information must first be encoded so as to replace these characters before the lines are processed as argument lines Within the CALLed form the variable is decoded to return the data to its original state The easiest way of performing this encoding and decoding is to use the same technique that is used between a browser and server when passing information Certain characters like the question mark amp ampersand and newlines also have specific meaning within a browser to server command a
392. ng the receiver and enough blanks necessary on the left to pad it out to the number of characters specified in the argument If the total number of digits is than the specified field width argument the returned string will be truncated e alignRight fill e g f 5 abc alignRight fill gt abc returns a new string containing the receiver and enough fill characters specified in the second argument necessary on the left to pad it out to the number of characters specified in the first argument If the total number of digits is more than the specified field width argument the returned string will be truncated e appendFilename e g set a c dir set b file htf f b a appendFilename gt cMiNfile htf returns a new string in which the receiver is combined with the argument to generate a pathname including the correct number of Y characters between each directory and filename i e always one and not two V or no V characters e appendFilenameDOS e g seta c dir set b file htf f ba appendFilenameDOS gt cMinfile htf returns a new string in which the receiver is combined with the argument to generate a pathname including the correct number of Y characters between each directory and filename i e always one and not two V or no V characters This is equivalent to appendFilename and ensures that the DOS directory separation character V is used e appendFilenameUNIX e g s
393. not found The requested URL was not found err500 e g see below generates the 500 internal server error message text This is not used by WebBase but can be used by a forms developer to indicate that some type of error has occurred WebBase User s Guide 133 Chapter 9 Variables 134 Example 9 17 err500 display 500 Internal server error Internal server error err501 e g see below generates the 501 not implemented error message text This is not used by WebBase but can be used by a forms developer to indicate that an option is not currently implemented Example 9 18 err501 display 501 Not implemented Not implemented err503 e g see below generates the 503 server too busy error message text This is displayed if a request is received from a browser but the server has currently been paused using the Pause Server option on the WebBase server window Example 9 19 err503 display 503 The server is too busy The server is too busy expire e g 0 the value of expire in seconds is added to the current time in GMT and returned to the browser in the header as the Expires parameter e g Expires Fri 12 Jan 1996 05 39 40 GMT This is the time at which the form is to be considered expired so that the browser will no longer display the results from its own cache but reissue the query to the WebBase server for updating This value defaults to 0 and should be overridden by the user with either a global variab
394. nt WebBase User s Guide 229 Chapter 11 Expressions 230 countBlanks e g f 3spaces asStream countBlanks gt 3 returns the number of character position skipped when reading the stream starting with where it is currently positioned A space is 1 a tab is 4 If the next character read by the stream is not a space or tab returns 0 indexOf e g f htf strm indexOf gt 106 returns the position of the first occurrence of the collection in the argument in the receiver If no such collection is found return 0 indexOfLowercase e g f unix strm indexOfLowercase gt 142 returns the position of the first occurrence of the collection in the argument in the receiver If no such collection is found return O All tests are done after converting the contents of the receiver to lowercase isEmpty e g f strm isEmpty gt false returns true if the receiver contains no elements otherwise false lineDelimiter e g f strm lineDelimiter gt cr returns the current line delimiter the default is a carriage return character lineDelimiter e g f cr strm lineDelimiter gt a FileStream on default htf returns the receiver after changing the line delimiter character to the argument This is only valid for file streams next e g f 10 strm next gt set outp returns the number of items from the receiver as specified in the argument The items are returned in a collection of the same type
395. nt currently being processed on each iteration through the loop e SorowHeader e g an OdbcRowHeader the OdbcRowHeader object for the most recent sql macro issued or nil if no sql has been used See Chapter 11 for the messages which can be sent to this object e 9 search e g first George AND Last Jones this variable is the precursor to WHERE It provides a very simplified form of the WHERE clause in which all testing is strictly by equality and all argument value pairs are put together with AND operators e seconds e g 61480 the time in seconds from the previous midnight as returned by the operating system This value is accessed from the operating system each time the variable is referenced and will therefore change during the processing of the form e self e g cMtpWestfile htf the full pathname of the file currently being processed If self is used in an inserted file it will contain the path of the file contained in the URL and not the path of the inserted file This is equivalent to root and form concatenated together WebBase User s Guide 143 Chapter 9 Variables 144 selfDirectory e g c ittp the full path to the directory containing the file currently being processed If selfDirectory is used in an inserted file it will contain the directory of the file contained in the URL and not the path of the inserted file This is equivalent to root and formDirectory concatenated together s
396. nt for all cars that are 2 door and have less than 100000 miles SELECT FROM Cars WHERE Kind 2 door AND MILES lt 100000 The OR statement can also be used to select records in which a field value matches one or the other criteria but not necessarily both Here s the SELECT statement for all cars that are 2 door or have less than 100000 miles SELECT FROM Cars WHERE Kind 2 door OR MILES lt 100000 A number of different operators can be used as shown above Some of the more frequent operator are lt lt gt gt and LIKE The LIKE operator is used to do a case insensitive comparison the operator does a case sensitive comparison When the LIKE operator is used it is also possible to use wildcards as part of the value The is the wildcard character It can be added at the beginning of the value the end of the value or both To select all cars whose transmission is auto the following statement would be used SELECT FROM Cars WHERE Trans LIK El 4 A Q G ct O 0 This would return matches for cars whose Trans entry was Automatic Auto and Almost Automatic The ORDER BY clause is useful to define the sort order of the resulting collection of records All of the records in the Cars database can be retrieved and sorted using the following statement SELECT FROM Cars ORDER BY Year ASC
397. nting the receiver in a lt TABLE gt lt TABLE gt format The argument specified is the title that is included in the table The results are identical to those presented above with the exception that the title is displayed at the top of the table e fullRecord e g f examORO fullRecord gt lt see below gt returns a string containing the column names and values for all the fields in the receiver The names and values are separated by a Each name value pair is separated by a carriage return The results from the above example are shown below Example 11 8 fullRecord example ID 26 Year 92 Maker BMW Model 318 IS Cylinders 4 Transmission 5 Speed Kind 2 Door Color Red Mileage 3000 Price 22900 0 Air true Cruise false Category Passenger Country European e getMessage e g f examORO getMessage gt returns any message associated with this receiver This may occur if the buffer was insufficient to hold all the data which was subsequently truncated The hasMessage 236 WebBase User s Guide returns true if there is a message to retrieve If there is no message to retrieve an empty string is returned e hasMessage e g f examORO hasMessage gt false returns true if there is a message associated with the receiver This may occur if the buffer was insufficient to hold all the data which was subsequently truncated The getMessage operation is used to retrieve the actual message e header e g f
398. ny localMachine RegistrationDatabase copyFrom in to in gt aRegistrationDatabase copy the key and all subkeys from one location in the registry to another An error is generated if the input key is absent the output key will be created or overwritten currentUser e g f RegistrationDatabase currentUser gt aRegistrationDatabase returns a new instance of the receiver corresponding to the HKEY_CURRENT_USER predefined key The keyName for top level registration databases is a number e g 2147483652 that uniquely identifies this top level RegistrationDatabase localMachine e g f RegistrationDatabase localMachine gt aRegistrationDatabase returns a new instance of the receiver corresponding to the HKEY_LOCAL_MACHINE predefined key The keyName for top level registration databases is a number e g 2147483652 that uniquely identifies this top level RegistrationDatabase new e g f RegistrationDatabase new gt aRegistrationDatabase returns a new instance corresponding to the HKEY_CLASSES_ROOT predefined key new e g f Access Database CurVer RegistrationDatabase new gt aRegistrationDatabase returns a new instance which spans out from the hierarchy node specified in the argument The argument must be a subtree within HKEY_CLASSES_ROOT it can specify one subtree or a full specification printHierarchy e g f RegistrationDatabase printHierarchy gt returns a String containing a h
399. nya com re Order Confirmation 2 lt gt Queue mail Fri 11 Apr 1997 12 26 49 dt 04 11 97 12 04 22 fr vendor CompanyB com to customer CompanyA com re Order Confirmation 1 lt gt Service active as of Fri 11 Apr 1997 12 26 39 AARAAAASTN MINI LA A A vyv 00D do VME ONSITE ID WebBase User s Guide WebBase Server Window When the WebBase E Merge utility in WebBase is enabled the WebBase Server Window includes some additional menu options Menu Options The following are the WebBase E Merge options available from the pull down menu bar at the top of the WebBase Server window e Edit gt Mailer If this menu option is selected the WebBase Mail Service Window is opened Note that this window will also be opened if mail has been sent out since WebBase was started e Enable Mail Log File If this option is selected one of the dialogs shown in Fig 16 8 will be displayed The dialog on the left is displayed if mail logging is currently on the dialog on the left is displayed if there logging has been disabled Mail log files will be generated for each WebBase E Merge transaction if a user has also defined the LogDirectory parameter If logging is enabled a mail log file is created each day to record all mail activity with WebBase Each log entry contains a timestamp the date the message was to be sent who the message is from who the message is to and the subject of the message The actual text of the message is not in
400. o determine exactly the nature of the error if specialized processing is needed In general users should not require this option This does not prevent the macro from generating an error the user should still wrap the sq macro with the errorProtect macro Within the onError branch the user can use the contents of this variable to determine the explicit error Using the f error messageText within the error branch returns the ODBC error message to the user as well as all of the WebBase error information macro dump stack dump etc keepHandle Boolean The only purpose for this keyword is to address a problem with Microsoft Access 7 0 and greater databases and the associated ODBC driver If false default the handle is not kept following the sql statement unless of course the handle is cached in the ODBC connection cache If true the handle allocated for the ODBC connection to the data source will not be free following its use In addition even if one has the Cache ODBC Connections menu option enabled the connection handle associated with this sql statement will not be placed in the ODBC cache following use but will be disconnected but not freed This will ensure that the handle does not cause any General Protection Fault GPF errors to occur either by executing the sql statement or by clearing the ODBC cache explicitly or on server shutdown See Chapter 14 for details on implementing this keyword to address the Mic
401. o disclosure hereunder is disclosed to you without restriction by a person having the right to make such a disclosure without breach of an obligation of confidentiality The terms of this agreement regarding the protection and security of the Program shall remain in full force and effect for so long as you continue to use process or have access to the Program including any trade secrets embodied or reflected therein WebBase User s Guide 5 The Program is provided and COMPANY SHALL HAVE NO LIABILITY FOR ANY WARRANTY TRAINING OR INSTALLATION SERVICES OR USE OF THE PROGRAM OR ITS OUTPUT O 1995 7 ExperTelligence Inc All Rights Reserved WebBase User s Guide 297 Appendix B Special Configuration Issues f E hd SE Special aprendi Configuration Issues B 1 16 bit Systems This section provides details on how to set up WebBase parameters extensions aliases and global variables in their respective initialization files This information is only applicable to 16 bit systems running Windows 3 1 and Windows for Workgroups 3 11 This information for 32 bit systems Windows NT Windows 95 is provided in Chapter 4 and Chapter 9 Installation For 16 bit systems WebBase accesses its parameters from a WebBase ini file WebBase uses this file to access information about the environment in which it will be executing Chapter 4 describes these parameters in detail the remainder of this appendix covers how the WebBase ini file ca
402. o disk every lt nn gt times the dictionary is accessed to reduce the required disk accesses Again all this can be done in a single file so very little needs be done to each of your web pages besides an insert of or call to this file The WebBase WebWizard Database Example 3 provided with WebBase performs automatic logging of each database query to another database The Web analysis tools that are now available as shareware or commercial systems can be used with the log files generated by WebBase These tools are useful for determining the number of hits to a site as well as much more information WebBase User s Guide 281 Chapter 16 E Merge WER 56 E Merge Chapter 16 16 1 282 WebBase E Merge is an add on product to WebBase that allows a webmaster to search a database and send mail merge letters that are individualized and customized by criteria Fields from the database can be merged into e mails and paragraphs can be conditioned on calculations E mails may also be sent to arbitrary selections of the database as the result of an event and even queued for delayed delivery WebBase E Merge supports normal and timed e mail as well as attachments An additional licensed features key is required before a user can use E Merge Contains sales expertelligence com for information on obtaining this LicensedFeatures key Configuration WebBase E Merge does not require a separate installation the necessary software is included whe
403. o for more details Example 8 30 removeHeader Macro create and remove a header variable setHeader Expires UniversalTime now asString more WebBase statements removeHeader Expires removeLocal lt varNames gt The removeLocal macro removes the specified local variable s If scoping is not being used this is equivalent to the remove macro If scoping is being used this will remove the variable s from the local context but will not affect any scoping variables of the same name If no local variable with the specified name exists no error is returned One or more variables can be specified as arguments see the remove macro for more details Example 8 31 removeLocal Macro create a local variable set lVar testl scope set lVar test2 2 more WebBase statements removeLocal lVar the value of lvar is still test2 within the scope scope the local lvar no longer exists removeUser lt varNames gt The removeUser macro removes the specified variable s from the current user dictionary as specified with the variable userName If no user variable with the specified name exists 100 WebBase User s Guide no error is returned One or more variables can be specified as arguments see the remove macro for more details Example 8 32 removeUser Macro create a user dictionary and user variable set SuserNames userVars setUser u
404. o the argument The receiver will be printed with the substitutions listed below taking place Note that there must be a separation character between the M d and y characters the separation character will be displayed in the output e g MM dd yy 01 24 96 Every single M uppercase M will be replaced by the number of the month as a single or two digit value WebBase User s Guide 211 Chapter 11 Expressions Every two consecutive MM s uppercase MM s will be replaced by the number of the month as a two digit zero left filled if necessary value Every three consecutive MMM s uppercase MMM s will be replaced by a three letter ABBREVIATION for the month e g 03 Mar Every four consecutive MMMM s uppercase MMMM s will be replaced by the full NAME of the month e g 03 March Every single d lowercase d will be replaced by the number of the day as a single or two digit value Every two consecutive dd s lowercase dd s will be replaced by the number of the day as a two digit zero left filled if necessary value Every three consecutive ddd s lowercase ddd s will be replaced by a three letter ABBREVIATION for the day of the week e g Sun Every four consecutive dddd s lowercase dddd s will be replaced by the full NAME of the day of the week e g Sunday Every two consecutive yy s lowercase yy s will be replaced by the last two dig
405. o to the end of the file it does not loop around and start over at the beginning of the file Likewise a backwards search will only go to the beginning of the file it does not loop around and start over at the end of the file The keyboard shortcut lt ctrl gt F press the Ctrl key and the F key down at the same time will also cause the Find Dialog to be displayed 48 WebBase User s Guide Figure 5 2 Find Dialog Find EAS I Case sensitive ppm Forward Backward e Edit gt Find Again If no string has been specified on the Find Dialog the user is prompted to enter the search string Using either this string or the string previously specified on the Find Dialog the next occurrence of the string is located and highlighted Note that if no string was specified on the Find Dialog the default search direction forward and type case insensitive will be used If a search string was specified on the Find Dialog the search parameters specified on the Find Dialog will be used The keyboard shortcut lt ctrl gt G press the Ctrl key and the G key down at the same time can also be used to invoke the Find Again function e Help gt Current User News If this option is selected the latest news from ExperTelligence will be retrieved and displayed in the window Any previous news or error messages displayed on the window are not cleared It is recommended that the Edit gt Clear All News option be selected before this
406. o within WebBase is used to generate a database query WebBase packages the query into an ODBC function call that is then passed to the ODBC driver The driver accepts the ODBC requests translates them into internal format recognizable by the database system e g ODBC to Microsoft Access manages the communications with the database itself and provides the results back to WebBase WebBase completes processing of the results and they are then available in the form for subsequent use The advantage of using ODBC in this approach is that it allows WebBase to support any ODBC compliant database with no need for internal knowledge about the specifies of a particular database system It is possible to design forms with multiple database queries and queries of multiple database systems via different ODBC drivers For example it is possible to retrieve information from a Microsoft Access database and use it to generate a new record in an Oracle database In the future if the Oracle database is replaced by a SQL Server database no change to the WebBase forms are required WebBase User s Guide 71 Chapter 6 ODBC amp SQL 6 2 Structured Query Language Structured Query Language or SQL is a database access language It is based upon the relational database model A relational database is basically a collection of tables of data Data is stored in rows in each table Each row is broken into cells or fields of data each row of data within a table has
407. oEnd 232 setUser macro 106 163 shortNameOfDay 216 shortNameOfMonth 216 Show In Process Mail Menu Option 288 Show Mail Queue Menu Option 288 Show Server Status Menu Option 61 Show Stats Menu Option 288 Show TCP IP Status Menu Option 61 sign 175 signalError macro 106 significand 178 sin 175 size 186 206 226 232 size parameter 156 skip 232 skipSeparators 232 skipTo 232 skipToWhitespace 233 skipWhitespace 233 SMTP_Server parameter 284 Software License Agreement 297 sortAscendingAt 196 sortDescendingAt 197 space 234 Splash Screen 7 SQL 7 72 sql macro 8 71 81 90 107 235 258 sql parameter 109 156 sqrt 176 squared 176 Start heartbeat service Menu Option 67 Start Mailer Menu Option 286 Start Transaction Writing Menu Option 60 startTime 248 StartupForm parameter 37 status 57 Stop heartbeat service Menu Option 67 Stop Mailer Menu Option 286 Stop Transaction Writing Menu Option 60 Stored procedures 280 strictlyPositive 176 stripQuotes 197 Structured Query Language See SQL subdirectories 229 subtractDate 213 subtractDays 213 subtractTime 217 suffix parameter 157 sum 186 symbolConstant 197 System DSN 29 33 System Parameters 58 324 System Registry 35 38 304 T tab 234 tab 234 table source user password 250 tablesIn user password
408. obal user or local variable or overridden explicitly in the sq macro using the buffer keyword argument This defaults to 8192 bytes e start the number identifying the first matching record to be returned by the sql macro This can be created as a global user or local variable or overridden explicitly in the sq macro using the start keyword argument This defaults to 1 e statusCode this variable is used to change the default status code that is returned as part of the header message All servers use the same status numbers For example 200 means OK and 404 means file not found The variable should be set to an integer or begin with a 3 digit status value If the variable is set to a string the first 3 characters must be one of the valid status codes listed below Any additional text provided with the variable is not used The valid status codes are Example 9 34 statusCode values 100 Continue 101 Switching Protocols 200 OK 201 Created 202 Accepted WebBase User s Guide 151 Chapter 9 Variables N 03 Non Authoritative Information 04 No Content 05 Reset Content 06 Partial Content 00 Multiple Choices Moved Permanently 02 Moved Temporarily 03 See Other 04 Not Modified o m 05 Use Proxy 00 Bad Request 01 Unauthorized 02 Payment Required 03 Forbidden 04 Not Found 05 Method Not Allowed 06 Not Acceptable 07 Proxy Authentication Required 08 Request Time out 09 Conflict
409. of fields returned for that sql statement The header contains things like column field names column widths column types etc The example OdbcRowHeader is accessed via the OdbcRowObject used above set examORH examORO header at e g f ID examORH at gt 1 returns the number of the column specified by the argument which must be a symbol colTypeOf e g f 1 examORH colTypeOf gt 4 returns an integer representing the sql type of the column specified in the argument The argument must be an integer The different sql types are described as part of the OdbcRowObject columnSqlTypes operation columncbColDefs e g f examORH columncbColDefs gt 10 5 15 15 3 10 15 15 10 15111510 returns an array of column definitions columnDisplaySizes e g f examORH columnDisplaySizes 11 6 15 15 3 10 15 15 1122111510 returns an ordered collection of the display sizes of each field in the row columnLengths e g f examORH columnLengths gt 4 2151511015 15481115 10 returns an ordered collection of the length of each field in the row columnNames e g f examORH columnNames gt ID Year Maker Model Cylinders Transmission Kind Color Mileage Price Air Cruise Category Country returns an ordered collection of the names of each field in the row columnSqlTypes e g f examORH columnSqlTypes 4 5 12 12 6 12 12 1248 7 7 12 12 returns an ordered collection of the SQL types of each field in the
410. of objects for read and write access Read Write Stream Instance Operations All of the operations described above for streams and write streams can also be performed on read write streams The following operations are specifically for read write streams e next e g set strm This is an example string YReadWriteStream on f strm next gt T returns the next object accessible by the receiver and advances the stream position If the receiver is at the end returns an error e truncate e g set strm This is an example string ReadWriteStream on f 15 strm position f strm truncate f strm contents This is an exam returns the receiver after setting the size of its stream to its current position Read Write Stream Class Operations The ReadWriteStream variable represents the ReadWriteStream class which can use the stream class operations described above There are no class operations specifically for this class WebBase User s Guide 233 Chapter 11 Expressions 11 30 File Streams A file stream allows streaming over the characters of files for read and write access A file stream accesses its file in pages and streams across the string containing the current file page Because writes are buffered a flush or close message must be sent to the file stream to ensure that the written data is physically recorded All of the operations on read write streams can also be performed on file streams The exa
411. on and build numbers A build number is simply a minor revision number New builds are generated frequently and made available for download via the WebBase web site The build distributed on the CD or currently available on the WebBase web site may not match the build number described in these instructions Note that the installation process detects the type of computer system you are using and will occasionally display this information on the screens as in the example below The displays in this chapter were taken from a Windows 95 system Figure 3 1 Installation Initial Screen This program will install the complete WebBase 4 10 Build 56 application onto your Windows 95 4 0 950 system A yee ee A PO Visit http www ExperT elligence com WebB ase for more information and or to report problems Press to begin the installation Press Exit to quit this program now 1995 7 ExperT elligence Inc All Rights Reserved After pressing the Start button a warning screen is displayed as shown in Fig 3 2 In an initial installation of WebBase this screen can be ignored Select the Continue button to proceed with the installation 14 WebBase User s Guide WebBase User s Guide 15 Figure 3 2 WebBase Running Warning Is WebBase Currently Running X PLEASE NOTE It is highly recommended that you DO NOT install WebBase components into the same directory that a CURRENTLY EXECUTING WebBase applicat
412. on itself is not affected and can be started manually by selecting the WebBase icon However if you wish to have WebBase run as a service in the future you must do another installation in order to set up the necessary service batch files Upgrading to Windows NT If you are already running WebBase on a non Windows NT system and upgrade the operating system to Windows NT and wish to run WebBase as a service you must go through the installation procedure in order to have WebBase properly set up as a service and the necessary service batch files generated Note that this only applies when upgrading to a Windows NT environment If you are already running Windows NT and simply upgrade versions of Windows NT it is not necessary to reinstall WebBase WebBase User s Guide 33 Chapter 3 Installation 3 9 WebBase Support 34 You can get customer support for WebBase in any of these ways Review the list of questions and answers at and post your own questions in the WebBase Support Forum accessed via the WebBase Web site Read the latest documentation updates on the WebBase Web site Send email to support expertelligence com Call ExperTelligence at 805 962 2558 When requesting support please provide the following information WebBase version and build numbers Your operating system and version If the question is database related the database in use The source for the ODBC you are using drivers versions dates WebBase User s G
413. ons It is a precursor to the current WHERE variable It returned the arguments as a string of arg value with the intervening amp replaced with AND startTime e g f cmd startTime gt 28739920 The number of milliseconds between the previous midnight and when current command was started It is used by elapsed to determine elapsed time to the point where elapsed is executed text e g f cmd text Returns the text for the command This is the entire file being processed Any insert files are not included in this string timerQueueSQL e g f cmd timerQueueSQL OrderedCollection anODBCRowObject anODBCRow Object Returns a collection of SQL like OdbcRowObjects that contain the following fields id title created period date time count minutes ranDate and ranTime The id title period date and time fields are those specified as keyword value arguments to the timer macro The created is the date time when the entry was created and initially put onto the timer queue The count is the number of times the form will yet be run before it is removed from the queue The minutes is the number of minutes remaining before a periodic entry will be executed again The ranDate and ranTime are the last date time the entry was executed WebBase User s Guide userAgent e g f cmnd userA gent gt
414. ons such as Netscape and Microsoft Internet Explorer WebBase User s Guide 121 Chapter 9 Variables Cookies are a general mechanism which servers can use to both store and retrieve information from clients A server when returning an HTTP object to a client may also send a piece of state information that the client will store Included in that state object is a description of the range of URLs for which that state is valid Any future HTTP requests made by the client which fall in that range will include a transmittal of the current value of the state object from the client back to the server The state object is called a cookie for no compelling reason Cookies are very useful for maintain state across multiple forms as well as across time However not all browsers support cookies and some users may not have cookie support enabled at their browser To maintain state through multiple forms WebBase provides user variables that are described in the next chapter Creating Cookies Cookies are created using the setCookie macro Any outbound cookies created using this macro are sent to the browser when the form is returned to the browser for display The browser may or may not do anything with the cookies depending on the level of cookie support enabled at the browser A number of parameters can be specified with cookies that determine which domains they are valid for and whether they will be persistent or memory resident in the
415. option is selected 5 2 WebBase Server Window The second window displayed when WebBase is started is the WebBase Server Window The title of this window always indicates the version and build of the WebBase server An example of this window is shown in Fig 5 3 below WebBase User s Guide 49 Chapter 5 WebBase Windows 50 Figure 5 3 WebBase Server Window ES WebBase 4 10 build 56 Server Al x WebServer Edit Options Help 070 Tue 06 May 1997 13 46 49 Idle Copyright 1995 7 ExperTelligence Inc WebBase 4 10 build 56 Server License 822375 2468999 valid Permanent License Started Tuesday 06 May 1997 13 46 48 GMT Parameters 4 10 On host willnchiq expertelligence com Using port 80 Sockets status Running on Windows 95 DLL Microsoft Windows Sockets Version 1 1 Maximum Number of Sockets 256 Size of largest UDP datagram 65467 Registry Parameters AppDirectory CWebBase Application C WYebBase WebBase exe Directory CAHTTP errorLogFile C WYebBase LOGS WebEnrror log There are three components to this window the menu bar the status line and the text area Each of these are described in the following sections WebBase Server Window Menu Bar The menu bar provides four sets of menu options Each set is described below WebServer Menu Options Pause Server This is a toggle on off option If the server has been paused a check mark is displayed next to the menu option If the server is
416. opulated are specified immediately after the table name all of the values to store into the fields are stored in the same order immediately after VALUES There must be a 1 1 correlation between the field names and the values to be stored in them The style used above to present the fields and values as columns is not required all of the information can be placed in a single line INSERT WebBase Usage As with the SELECT statement described earlier it is very easy to take an explicit INSERT statement and use it within WebBase Assume there is a form into which a user enters information about their car The car information is stored in the WebBase variables year make model miles and price A new record will be created with these variables using the following sql to allCars source myAccess user fred password test INSERT INTO Cars ID Year Make Model Miles Price RecDate VALUES 4 year make sql true model sql true miles price SdateTimes A new field is being added into this record called RecDate This is the date on which the record was created Such a field is not required in a table although it is often found useful to know when a record was created and or last updated The value stored into that field is the current date and time Because it is a date time field the variable must be enclosed with signs UPDATE The UPDATE statement is used to c
417. or creating a local variable of the same name in a form A list of the WebBase dynamic variables is displayed in the WebBase Server window when WebBase is started Some variables displayed on this list are for WebBase add on products which are documented separately Other dynamic variables in the list are considered obsolete and are described in Appendix D The WebBase dynamic variables an example of their contents and their descriptions are e 9 allUserVariables e g Dictionary UW14259281E161808318469B gt Dictionary altered gt true expires gt 60 Usitelname gt Personnel Directory Service a dictionary of the dictionaries of user variables The keys to the top level dictionary are the names of the different user variable dictionaries that have been created The values in the top level dictionary are the dictionaries containing user variables The user Variables dynamic variable shows all the user variables defined for the user variable dictionary currently specified in 7 userName This variable shows the user variable dictionaries for all user variable dictionary names including that specified in userName Details on user variables can be found in Chapter 10 e 9 allUserVariableseHTML e g see below formats all the dictionaries containing user variables for a nice printout on the browser The userVariablesHTML dynamic variable shows all the user variables defined for the user va
418. ort weekday name as a symbol corresponding to the weekday index integer argument Mon for 1 Sun for 7 shortNameOfMonth e g f 2 Date shortNameOfMonth gt Feb returns the short month name as a symbol corresponding to the month index integer argument Jan for 1 Dec for 12 today e g f Date today gt 03 18 97 returns a date representing the current date WebBase User s Guide 11 21 Times A time represents a particular time of day to the nearest second The dynamic variable time returns the current time Time Instance Operations The following messages can be sent to any WebBase variable containing a time For the following examples assume time 01 30 00 PM lt e g set timel 8 00 00 PM asTime f time timel lt gt false returns true if the receiver is less than the argument otherwise false lt e g set timel 8 00 00 PM asTime f time timel lt gt false returns true if the receiver is less than or equal to the argument otherwise false e g set timel 8 00 00 PM asTime f time timel gt false returns true if the receiver and argument are the same time otherwise false gt e g set timel 8 00 00 PM asTime f time timel gt gt true returns true if the receiver is greater than the argument otherwise false gt e g set timel 8 00 00 PM asTime f time timel gt gt true returns true if the receiver is greater than or equal to the argument
419. orts and would like to use if the server finds it appropriate to switch protocols e User Agent contains information about the user agent originating the request This is for statistical purposes the tracing of protocol violations and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations User agents SHOULD include this field with requests The field can contain multiple 308 WebBase User s Guide product tokens and comments identifying the agent and any subproducts that form a significant part of the user agent e Via used by gateways and proxies to indicate the intermediate protocols and recipients between the user agent and the server on requests and between the origin server and the client on responses It is intended to be used for tracking message forwards avoiding request loops and identifying the protocol capabilities of all senders along the request response chain WebBase User s Guide 309 Index WEB ns OO B Obsolete ExperTolligonco appendix Components This appendix describes macros variables and parameters which are still supported by WebBase but are considered obsolete These macros variables and parameters may be dropped from future versions of WebBase It is recommended that forms designers review any existing forms to ensure that these macros variables and parameters are not used D 1 Obsolete macros e include file The
420. ost non alphanumeric characters as a sequence of three characters a percent sign followed by two hexadecimal digits representing the original ASCII character s numerical equivalent WebBase User s Guide 155 Chapter 9 Variables 156 The browser provides any necessary encoding for the command line arguments generated by the lt FORM gt lt FORM gt construct WebBase will handle any necessary encoding on arguments passed via the redirect2 macro However it is the responsibility of the form designer to properly set up any arguments and values used on anchors and their associated HREFs The general rule of thumb is that any WebBase variable containing text and used as an argument on an anchor must include the encode true parameter For example lt A HREF file2 htf numArg nArg amp strArg sArg encode true gt lt A gt HTTP command line processing stops at the first space character If the encode true parameter is not used on a variable containing a string some of the string value may be lost Any variables and values following the space will also not be set up as variables nonempty When nonempty true is specified a amp nbsp Non Breaking Space sequence will be returned in place of a nil or empty string value This is helpful when formatting table fields as most browsers do not display a border for a field that has no value to display The amp nbsp sequence constitutes a displayable value and thus the border i
421. otherwise false addTime e g set twoHoursInSeconds 60 60 2 set timel twoHoursInSeconds Time fromSeconds f timel Ytime addTime gt 03 30 00 AM returns a new time in which the amount of time specified in the argument a time has been added to the receiver time asSeconds e g f time asSeconds gt 48600 returns the number of seconds from midnight until the specified time between and e g set timel 8 00 00 AM asTime set time2 8 00 00 PM asTime f timel time2 time between and gt true returns true if the input time is between the receiver and the argument hours e g f time hours gt 13 returns the number of hours from midnight until the specified time max e g set timel 3 30 00 AM asTime f timel time max gt 01 30 00 PM returns the greater of the receiver or the argument min e g set timel 3 30 00 AM asTime f timel time min gt 03 30 00 AM returns the lesser of the receiver or the argument minutes e g f time minutes gt 30 returns the number of minutes past the hour printOn12Hr e g set strm String new WriteStream on f strm Yotime printOn12Hr f strm contents gt 01 30 00 PM WebBase User s Guide 215 Chapter 11 Expressions 216 appends a string representing the receiver time to the stream specified in the argument The time is in 12 hour plus AM PM format printOn24Hr e g set strm String new WriteStream on
422. ould explicitly check for a value of a variable if there is the possibility that it will not exist To check for the value of a variable use if varName cmd variableExists This returns either true or false which can cause the appropriate branch within the if macro to be invoked Other operations on HttpCommand that can be used are fromVars default and fromNonNullVars default Microsoft a Boolean indicator of whether the calling browser is Microsoft Internet Explorer If a user needs to present information for a specific type of browser it is recommended that the User Agent header variable be examined to determine the browser type While this dynamic variable can be used the information returned in the User Agent variable may change as new versions of browsers become available This dynamic variable also does not indicate version information e g MSIE 2 0 or 3 0 Netscape a Boolean indicator of whether the calling browser is a Netscape browser If a user needs to present information for a specific type of browser it is recommended that the User Agent header variable be examined to determine the browser type While this dynamic variable can be used the information returned in the User Agent variable may change as new versions of browsers become available This dynamic variable also does not indicate version information e g Netscape 2 0 or 3 0 WebBase User s Guide 311 Index D 3 Obsolete variable pa
423. p test htf a dictionary containing all the forms which are currently cached If cacheEnabled is disabled this dictionary will be empty See cacheEnabled for details on why caching should be used See also FORMScacheHTML e FORMScacheHTML e g see below returns the list of forms which are currently cached If cacheEnabled is disabled there will be no forms in the cache See cacheEnabled for details on why caching should be used For each form in the cache there are 5 items displayed the full file specification the date and local time 1t was cached by WebBase the date and time 1t was last modified on disk and the time in milliseconds for when the file was cached See also FORMScache Example 9 20 FORMScacheHTML display Forms cache form size cached_date time file_system_date time lt ms clock gt 1 e c Xhttpltest htf 472 bytes at 03 10 97 10 04 46 AM 03 10 97 05 39 24 lt 36286250 gt e 9 fullHostAddress e g 1 2 3 4 80 the IP address and port number that the request from the browser was received on If the address entered by the user was alphabetic e g www expertelligence com this will reflect the numeric IP address e fullHostName e g www mydomain com 80 the HostName parameter if specified One can provide a HostName parameter and that will be returned by this variable along with the port number If HostName is not specified as a parameter the IP address will be return
424. parameter name is entered incorrectly WebBase will not be able to use its value The values for string input fields are not case sensitive The following are the WebBase parameters whether they are required or optional and their default value e PortNo required the number in decimal of the port used by WebBase to communicate with browsers This port number must be unique within your environment i e not assigned to another application The default for this parameter is 80 which is 4 All WebBase related information is stored in the System Registry in HKEY_LOCAL_MACHINE SOFTWARE ExperTelligence Inc WebBase 4 10 Prior to build 56 this information was stored in HKEY_LOCAL_MACHINE System CurrentControlSet Services httpSQL Effective with build 56 only the WebBase parameters required to run WebBase as a service on Windows NT are stored in the latter location WebBase User s Guide 35 Chapter 4 Initialization 36 the default port used by any HTTP Web server If you will be running multiple web servers each must be assigned a unique port number Directory required the directory within which the form files are stored The files may be within this specific directory or they may be within subdirectories During the WebBase installation this directory is specified as the HTTP Root Directory This directory location corresponds to a browser referencing http host address The default for this parameter i
425. password pair is sent to the server an error code of 401 Unauthorized is returned by the server Before addressing how authorization should be set up using WebBase the user must first decide which page s require authorization before the user can view them Any page requiring authorization should include something similar to the code presented in Fig 13 1 at the top of each page Fig 13 1 Example code checking for authorization set Soutput false if Authorization Scmd getVariable isNil reDirect login htf exit if The user must specify the file referenced by the redirect macro there is no requirement that it be called login htf as in the example code above This authorization check can be included in a separate insert file e g checkAuth htf so that only the following would have to be added on each page requiring authorization insert checkAuth htf Figure 13 2 is an example of a form that requests authentication via the browser 262 WebBase User s Guide Fig 13 2 Form requesting authentication comment Check if authentication has been performed yet The variable Authorization will be nil if authentication has not yet been performed When the variable Authenticate is set to hold a non empty string WebBase will inform the browser that authentication should be performed The string associated with the Authenticate variable along with the entered IP address is used
426. pear multiple times in the varList variable This is done by listing all the variable names as the value of varList separated by commas For example if the above form had a list of manufacturers styles and colors as well as model types to select from the following expression would be used lt INPUT TYPE HIDDEN NAME varList VALUE manufacturer modtype style color gt whileLimit used by the while macro it limits the number of times the macro will loop regardless of the state of the condition This is useful as a safeguard during development to prevent infinite loops WebBase User s Guide 9 5 Displaying Variables The value of a WebBase variable can be displayed in HTML by enclosing the variable name in curly braces e g counter Parameters can be used to control the format in which variables will be displayed within the HTML resulting from WebBase processing the htf file Variable parameters are specified following the variable name and within the braces using the format parameterName value One or more parameters can be specified with each variable name However parameters can only be used when the variable name only is within the braces Parameters cannot be used with variables in an expression The following is a valid WebBase variable expression counter size 5 align right prefix The following is an invalid expression using variables and parameters set myCntr counter size 5 ali
427. pen This window is only necessary to read the latest news about the product e Edit gt Copy This menu option is only active if an area of text in the window has been highlighted If this menu option is selected the highlighted text is copied into the system s paste buffer It can then be placed into another application e g Word PowerPoint The keyboard shortcut lt ctrl gt C press the Ctrl key and the C key down at the same time can also be used to perform a copy operation e Edit gt Clear All News If this menu option is selected the news information displayed below the startup information is cleared The user may subsequently select to view updated news by selecting the Help gt Current User News option Clearing the news area is also useful to easily see if any errors occur since error information is displayed in this window e Edit gt Find If this menu option is selected the Find Dialog shown below in Fig 5 2 is displayed The user must specify the string to be found as well as whether the search will be forwards or backwards from the current location of the cursor This dialog also allows the user to specify whether a case sensitive or insensitive search will be done Once the information to be matched is entered the user selects the Find button If a match is found it is highlighted If no match is found a dialog indicating that the search string was not found is displayed Note that a forwards search will only g
428. pires attribute specifies a date string that defines the valid lifetime of that cookie Once the expiration date has been reached the cookie will no longer be stored or given out The date string is formatted as Wdy DD Mon YY HH MM SS GMT If not specified the cookie will expire when the user s browser session ends The section on Cookie Local Variables earlier in this chapter provides additional details about cookies and their expiration It is important to note that the value of this variable is used at the time the cookie is created by the setCookie macro it is thus possible to change the expiration for cookies created within a single form by changing the value of this variable cookieInVariables e g Dictionary CookieCounter gt 17 WebBaselD gt W14259214E161808318465B a dictionary of the cookie variables that were received in the header of the request from the browser The keys to the dictionary are the cookie variable names the values are the contents of the cookies These incoming cookie local variables are automatically created WebBase User s Guide when the header variables are created They are not returned to the browser unless they are modified via a setCookie macro The dictionary returned by this variable is a copy thus modifying this dictionary will have no effect on the cookie variables active in WebBase This dictionary should be used for information only See also cookielnVariablesHTML cookieVari
429. pmost scope see scope macro or local variable if found If no variable is found in either the scope or local 98 WebBase User s Guide variables no error is returned The argument is one or more variable names If one variable is to be removed the format is remove aVar If multiple variables are to be removed the format is remove aVar bVar cVar Example 8 26 remove Macro set myVar abcdef Now set up scoping and create a variable scope set scopeVar 12345 more WebBase statements remove myVar scopeVar scope removeAll lt varNames gt The removeAll macro removes all scope and local variables of the given name If no variables by this name exist within the current scope s or as a local variable no error is returned One or more variables can be specified as arguments see the remove macro for more details Example 8 27 removeAll Macro set aVar abcdef Now set up scoping and create a variable of the same name scope set aVar 12345 more WebBase statements removeAll aVar scope removeCookie lt varNames gt For each name in the lt varNames gt list the removeCookie macro creates a cookie by the specified name and sets its value to deleted The expiration tag for the cookie is set to Tuesday 01 Jan 1901 01 01 01 GMT The cookie is added to the output cookies and is returned to the browser when the form processing is completed If a cookie by the sp
430. ppending all of the strings in the first argument with the second argument used as a separator character between each substring readFrom e g f abc defg hi asStream String readF rom gt defg read and return a string from the argument which is a stream A string comprises all of the characters between quotes Two quote marks together put a quote into the string 11 11 Symbols 196 A symbol is a sequence of characters that is guaranteed to be unique throughout WebBase Symbols are represented using the symbol notation All of the operations for Strings can also be used for symbols with the exception of at put and the replace operations There are no operations specifically for symbols While a number of operations described in this chapter return a symbol there is no variable used to access the Symbol class WebBase User s Guide 11 12 Ordered Collections An ordered collection is similar to an array except that it can grow to accommodate more elements if the original collection is not big enough An ordered collection is often used as a dynamic array stack or queue Ordered Collection Instance Operations This section describes all the operations that can be performed on an ordered collection An ordered collection is created and used by some WebBase macros For example in an sql to xxx SELECT sql construct the variable xxx will contain an ordered collection following the execution of the S
431. printVHTMLTable This is very similar to the printHTMLTable operation but prints the table vertically with labels on the left right justified a colon then values on the right left justified Name John Q Public Address 123 State St Telephone 123 456 7890 This operation should be used when there are a lot of fields horizontal table would require a lot of horizontal scrolling and especially when there is only a single row to be displayed The operation does iterate over all the rows in the collection it is sent to This only works on collections that contain OdbcRowObjects returned from an sql select printVHTMLTable e g sql to answers SELECT sql f Employees in Company X answers printVATMLTable This is the same as printVHTMLTable except that it allows a title to be specified When the table is displayed the title is displayed centered over the table This only works on collections that contain OdbcRowObjects returned from an sql select remove e g f two clinl remove cltn1 gt OrderedCollection one three returns the argument after 1t has been removed from the receiver removeAll e g f cltn removeAll gt OrderedCollection returns the receiver after all of the elements in it have been removed removeAll e g set cltn2 one two parseAt asOrderedCollection f cltn2 cltn1 removeAll clin1 gt OrderedCollection three returns the argument after all of the
432. pts for these parameters and updates the Registry appropriately Figure 3 7 WebBase Parameter Registry Values Dialog WebBase Parameter Registry Values Ed WebBase requires the following Required parameters be set in the Windows 95 Registry before it will Hep execute Required parameters PortNo Er Directory C HTTP Browse License Optional parameters errorLogFile C WebBase LOGS WebEnorlog Browse LogDirectory Browse Default Extension LicensedF eatures Don t Update Registry Abort The PortNo parameter specifies which port WebBase will use to communicate with a browser The default value is set to 80 If you have another Web Server installed and running on your system you need to ensure that both WebBase and the other web server s have unique port numbers The Directory parameter specifies where in your local directory structure browsers can access forms via WebBase This directory location corresponds to a browser referencing http host address Placing a default htf or default htm file in this directory will cause WebBase to return that form if a browser references http host address If you already have a Web Server running on your system you may choose the same directory that server uses to be your WebBase Directory It is strongly recommended you not use the Destination Directory into which you installed your WebBase application files as this makes a
433. r e g 4 10 Chapter 4 Initialization 8 If the key Extensions does not exist create it by selecting the Add New Key anchor and entering Extensions as the key name Remember that this name is case sensitive 9 Select the Open anchor next to the Extensions key All of the WebBase extensions currently defined and their mime type values are displayed in the table 10 To add a new extension select the Add new entry anchor and specify the extension name and desired mime type value 11 To modify an extension select the Edit anchor next to the extension and specify the changed value 12 Stop and restart WebBase so that the new modified extensions will take effect 4 3 Aliases 42 WebBase includes the ability to handle directory aliases When a URL is entered the node name immediately following the host name can be an alias For example if the URL www expertelligence com foobar filename htf was entered the foobar is extracted from the URL and WebBase checks the Aliases for an entry whose name is foobar If there is an alias that has been defined whose name is foobar with a value of f foo bar then the above URL would translate to referencing a form at foo bar filename htf and not in the default Directory generally c http Note that only the first node of the URL beyond the host name is used to see if it matches an alias The order for matching is
434. r All Menu Option 59 66 286 Clear All Caches Menu Option 51 Clear All News Menu Option 48 Clear All Menu Option 64 Clear Forms Cache Menu Option 52 Clear ODBC Cache Menu Option 53 258 270 clearFormsCache 245 clearOdbcCache 245 close 225 231 Close All Connections Menu Option 51 cmdStr 245 collapse 192 colTypeOf 236 239 columncbColDefs 239 columnDisplaySizes 239 columnLengths 239 columnNames 236 239 columnSqlTypes 236 240 colWidthOf 237 comma operator 170 comma parameter 155 command 245 command counter 57 Command line arguments 81 98 118 137 257 commandString 245 comment macro 89 Common Geteway Interface See CGI Common Log File Format 36 252 concat 183 concatenation 170 concatFrom to 183 concatFrom to with 183 concatWith 183 318 concurrent commands in process 57 Connection 308 containsAnyString 192 containsAnyStringlgnoreCase 192 containsInteger 173 192 containsNumber 173 192 containsString 192 containsStringChecked 192 containsStringlgnoreCase 192 contents 231 Content type 39 Cookie 5 Cookie variables 99 104 122 cookieTags 245 cookieWebBaseld 245 copy 170 Copy Menu Option 48 53 59 64 66 285 copy to 226 copyFrom in to in 243 copyFrom to 183 231 copyReplaceFrom to with 183 copyWith 183 copy Without 183 cos 173 countBlanks 231
435. r Variables pe f j PA e 52 Header Variables ExperTolligence Appendix C 306 This appendix describes the header variables that may be included with a request from a client browser These header variables are defined in the HTTP 1 1 specification If new specifications are approved additional header information may be defined The actual header variables received from a client browser are dependent on the implementation of HTTP supported by the browser It is always best to determine if a header variable is received from a browser before expecting it to be there WebBase does not currently support all the HTTP 1 1 functionality However incoming header parameters that are part of the HTTP 1 1 specification will still be received by WebBase and created as local header variables HTTP 1 1 Input Header Variables Accept can be used to specify certain media types that are acceptable for the response Accept headers can be used to indicate that the request is specifically limited to a small set of desired types as in the case of a request for an in line image If no Accept header field is present then it is assumed that the client accepts all media types If an Accept header field is present and if the server cannot send a response that is acceptable according to the combined Accept field value then the server SHOULD send a 406 not acceptable response Accept Charset can be used to indicate what character sets are acc
436. r401 htf e Error403 error403 htf e 6 Error404 error404 htf e tLogDirectory c http logl 1 2 3 5 4 e Directory c http p e Error403 error403 htf e Extensions Dictionary xpm 8 gt a MimeReturn xpm image x xpixmap true html amp gt a MimeProcess html text html true e JedynamicVariableNamesHTMLO e g see below returns the names of all the dynamic variables formatted for a nice printout on the browser as shown below Note that some of the dynamic variables are for use by add on products to WebBase such as E Merge Example 9 13 JodynamicVariableNamesHTML display Dynamic Variables 138 SadminTimes SallUserVariables SallUserVariablesHTML S allUserVarNamesHTML SAOLS Ao SWHERE SwhereAndOrS SwhereMultiAndOrs x Y e o o o o o o Ae o elapsed e g 12080 the elapsed time in milliseconds from the start of processing for this particular form The value of the variable will continually change each time it is accessed as it makes an operating system call each time it is referenced for the current clock time e PEQ e g returns an equal sign character 132 WebBase User s Guide error used by the errorProtect macro it is only set if an error condition occurs If so it contains the exception that caused the error The particular error message can be displayed by sending the operation messageText to the exception
437. rameters e at specifies an index into a table of rows returned by a database query This is used in conjunction with the in parameter For example using the collection of records returned by a SELECT statement and stored in the variable myCltn a specific field could be retrieved using NameField in myCltn at 1 This could also be used within a forRow macro and the value of the at parameter would be a variable with an integer value indexing into the collection The recommended alternative to this parameter is to use the forRow or with macros to identify particular records or fields and then use field variables to display the desired information e in specifies the name of a row variable from a forRow macro that contains the data from a row of a database query result This notation allows for nesting of forRow macro statements where the rows returned from 2 or more simultaneous database queries may contain the same field name Using the notation NameField in RowOne and NameField in RowTwo allows for explicit accessing of the correct field and row 312 WebBase User s Guide WebBase User s Guide 313 Index WEB T O ae YN QO ExperTelligonco Index 172 179 207 ys bell 207 bs 207 er 207 esc 207 ff 207 If 207 null 207 space 207 tab 207 oaccessed 161 all 161 created 160 expires 161 remove 161 allUserVariables 126 allU
438. ration of the scope If scoping is not being used then the set and setLocal macros are equivalent both will cause a local variable of the specified name and value to be created that will be in duration until the WebBase User s Guide form processing is completed If scoping is being used the sef macro will create a local scoping variable with the specified name and value that is only in existence until the scope is completed The setLocal macro when used within a scoping context will create or override a local non scoping variable that will be in existence beyond the scope macro and until form processing is completed The following example shows how the set and setLocal macros can be used with the scope macro Example 9 3 Scoping and local variables scope The following variable will only exist within the scope set sVar abc The following variable will exist outside the scope setLocal lVar true scope It is possible to nest scopes to create nested levels of scope dictionaries all of which might be searched when looking for a particular variable The innermost scope is the first to be searched followed by the next scope followed by any other scopes and then finally the local variables user variables global variables and dynamic variables Field variables within a scope will still take precedence over any other variables Additional information on scoping and local variables can be found i
439. rderedCollections OrderedLists SortedCollections SortedLists Strings and Symbols A Dictionary is also a collection but its structure is enough different that it is covered separately General Collection Instance Operations This section describes all the operations that can be performed on an instance of any type of collection Subsequent sections will cover the operations that are specific to a given type of collection Several of the operations described apply only to numeric values within a collection If the collection contains no numeric values a result of 0 is returned If there are a mix of numbers and non numbers in the collection only the numeric values are used for computations The examples shown for these operations are a list that contains the integers 1 2 3 generated using the expression set numCltn asInteger 1 2 3 parseAt map Note that any type of numbers can be included in collections Although ordered collections and strings are both types of collections examples of each will be presented for each of the operations below for clarification The example collection used is cltnl generated using set clin one two three parseAt The example string used is abc e comma e g set cltn2 four five size parseAt f cltn2 cltn1 gt OrderedList one two three four five six f xyz strl gt abcxyz returns a new collection with th
440. rds containing the name Denny from the Examples table The returned records are stored in the WebBase variable answers 8 WebBase User s Guide Section 2 on the form starts with if and ends with the line above forRow this is the WebBase if macro The first line of this section if O answers size tests the size of the answers variable If there are 0 answers the HTML immediately following the if statement is returned If there is at least 1 record returned the HTML immediately following the else statement is returned The WebBase forRow macro starts with forRow and ends with forRow It is used to loop on the answers returned from the SELECT the variable aRow takes on each of the returned results in turn The fields from the returned record e g Name Company are substituted where requested Here is what is displayed on the user s browser when 2 results are returned from the database Search results for name Denny Name Denny Bollay Company ExperTelligence City Santa Barbara State CA Zip Code 93101 Ph 805 962 2558 Name Denny XXXX Company Denny s Restaurant City Santa Barbara State CA Zip Code 93101 Ph 805 962 xxxx 2 3 Using the WebBase Language WebBase can be used as a simple Web server it can be used to provide easy database accesses or it can be used to provide flexible and dynamic presentations to users
441. re some examples of how to create a unique URL using command line arguments Each of these includes a variable called now whose value is set to seconds Since the number of seconds is going to be always changing this will keep the form from being cached at the browser so the latest information will always be retrieved and displayed for your users For an anchor lt A HREF form2 htf argl vall now seconds Next page lt A gt For a lt FORM gt construct lt FORM METHOD GET ACTION form2 htf gt some input statements lt INPUT TYPE HIDDEN NAME now VALUE Sseconds gt lt FORM gt For a redirect redirect2 form2 htf now seconds redirect2 There is no requirement that form2 htf actually has to do anything with the now argument passed in It is simply being used to override browser caching If you run the WebBase examples you ll notice this now construct showing up on lots of the examples This trick is only required when you are working with dynamic pages whose contents are expected to change But since that s what WebBase is designed for allowing a user to create dynamic pages from database information it s a very useful trick to master Forms Caching Forms are the files read and processed by WebBase By default they are htf files although other files can also be specified to be processed by WebBase When a file to be processed is specified in
442. rea When debugging a form one might wish to view and or capture some of the messages from the text area without having it scrolled off should other outside transactions come in This option allows the user to stop the posting as soon as the desired trace is shown and then resume later by selecting the Start transaction writing option When this option is selected the background of the window is changed to blue green Status gt Trace incoming headers This is a toggle on off option If tracing of incoming headers is enabled a check mark is displayed next to the menu option If tracing of incoming headers is disabled default no check mark is displayed If this option is selected one of the confirmations shown in Fig 5 15 is displayed If this option is selected the header records for the incoming messages are displayed in the text window This is useful for checking out cookie messages If a user requests the dateTime command the following information will be displayed some differences between systems will occur the display is for informational purposes only 19 lt gt in lt CrLf gt 18 lt gt in Cookie WebBaseID W14394896E161808318465B CookieCounter 1 lt CrLf gt 17 lt gt in Accept image gif image x xbitmap image jpeg image pjpeg lt CrLf gt 16 lt gt in Host 127 0 0 1 lt CrL gt 15 lt gt in Pragma no cache lt CrLf gt 14 lt gt in User Agent Mozilla 3 0 Win95 I
443. reate an instance of this class The following class operations are supported canConnect user password e g f myAccess fred test Databaselnfo canConnect user password true Returns true or false depending on whether it is possible to connect to the given ODBC data source isValidSource e g f myAccess Databaselnfo isValidSource true Returns true or false depending on whether the specified source name is set up as an ODBC source odbcDataSources e g f Databaselnfo odbcDataSources gt SortedCollection dBASE Files gt Microsoft dBase Driver dbf excell gt Microsoft Excel Driver xls FoxPro Files gt Microsoft FoxPro Driver dbf myAccess gt Microsoft Access Driver mdb Paradox Files gt Microsoft Paradox Driver db Text Files gt Microsoft Text Driver txt csv textExample gt Microsoft Text Driver txt csv returns a collection of all the ODBC data sources defined on the system The contents of the collection are associations The key of each association is the name of the data source the value is the name of the ODBC driver associated with the source The ODBC data sources that are returned are those that are probably associated with an actual database file Some ODBC drivers create virtual sources that do not have database files associated with them The full list of sources including virtual sources i
444. receiver that has been decoded per RFC 1421 WebBase User s Guide 189 Chapter 11 Expressions 190 authEncode e g f myName myPassword authEncode gt Basic bxXlOYWIlOm15UGFzc3dvcmQ returns a new string representing the receiver that has been encoded per RFC 1421 for use in the Basic Authorization capabilities within WebBase authPassword e g f Basic kxXlOYW11Om1I5UGFzc3dvcmQ authPassword gt myPassword returns a new string containing the password portion of the RFC 1421 encoded string see authEncode authUserName e g f Basic bkXIOYW1lOm1I5UGFzc3dvcmQ authUserName gt myName returns a new string containing the user name portion of the RFC 1421 encoded string see authEncode authValid e g f Basic LXIOYWIlOm15UGFzc3dvcmO authValid gt true returns true if the receiver begins with Basic and contains at least one character as required by RFC 1421 see authEncode otherwise false base64decodeFileTo e g f c temp encoded htf c temp decoded htf base64decodeFileTo c temp encoded htf returns the argument after decoding the contents of the file whose pathname is the receiver to a file whose pathname is the argument See also base64EncodeFile to These operations are used by the mail macro and setting up mail attachments to be sent base64EncodeFile to e g f c temp encoded htf tagArg cMhttp wbwizard Wizard base64EncodeFile to
445. rectory on the disk with the complete path name specified in the argument current e g f Directory current gt a Directory on C Nhttp wbwizard returns a directory representing the current directory currentDisk e g f Directory currentDisk gt 2 returns the current default drive 0 A 1 B etc drives e g f Directory drives gt a c d e returns the pathname strings of all the known drives WebBase User s Guide exists e g f cWwebbase Directory exists true returns true if the directory specified by the argument exists otherwise false pathName e g f cWwebbase Directory pathName gt a Directory on C webbase returns a directory described by the complete path name in the input argument remove e g f c myNewDir Directory remove gt Directory removes the directory with the path name specified in the input argument The directory must be empty before it can be removed removeAll e g f cAmyNewDir Directory removeAll gt true removes the directory with the path name specified in the input argument by first removing any files or subdirectories within the directory and then removing the directory Returns true if the directory removal was successful false otherwise 11 26 Streams A stream is used for accessing files devices and internal objects as a sequence of characters or other objects A stream has an internal record of its current posi
446. red in the WebBase variables numOwners and audioType the corresponding UPDATE statement in WebBase would look like sql to allCars source myAccess user fred password test UPDATE Cars SET NumOwners numOwners Audio audioType sql true WHERE ID 4 sql The numOwners value is being written into a numeric database field thus it does not require any special enclosing characters The audioType value is being written into a text field so it is enclosed in single quotes DELETE The DELETE statement is used to delete one or more records from a database DELETE General Usage The DELETE statement always specifies a table as well as a WHERE clause to identify the particular record or records to be deleted To delete the car record inserted and updated in the previous sections the following statement would be used DELETE FROM Cars WHERE ID 4 The WHERE clause can include a single field value pair or it can specify several field and value pairs DELETE WebBase Usage Deleting a record in a WebBase form is as easy as adding or updating a record The appropriate DELETE statement is placed within the sql macro and any values are replaced by WebBase variables The WebBase statement to delete the record added to the cars table in the database would be sql to allCars source myAccess user fred password test DELETE FROM Cars WHERE ID carID sql
447. rent set of extensions it supports It is not required that each domain have a set of extensions specified If the particular IP address maps to a domain but there are no extensions specified for the domain then the default set of extensions is used If multiple domains are not being used this is the set of extensions as specified in the System Registry under Extensions Chapter 4 includes information on multiple domains and extensions Example 9 11 domainExtensionsHTML display Extensions 0 None e domains e g Domain for 1 2 3 4 Default default htf Directory c http et Error401 error401 htf Error403 error403 htf Error404 error404 htf LogDirectory cWMittplogl Domain for 1 2 3 5 Directory cMttpWp Error403 error403 htf Extensions Dictionary xpm gt a MimeReturn xpm image x xpixmap true etc returns a dictionary of all the domains that the user has defined The key is the domain address the values are a collection of the key value pairs specified for this domain e g WebBase User s Guide 131 Chapter 9 Variables extensions Chapter 4 includes information on multiple domains See also domainsHTML e 9 domainsHTML e g see below returns the multiple domain information formatted for a nice printout on the browser as shown below See also domains Example 9 12 domainsHTML display Domains 2 1 2 3 4 6 e Default default htf e Directory c http et e 6 Error401 erro
448. ressions 188 asCapitalized e g f aBc123xYz asCapitalized gt Abc123xyz returns a new string in which the first character is capitalized and any subsequent alphabetic characters are lowercase asCharacter e g f a asCharacter gt a returns the first character of string This functionality is now obsolete since a character can be defined using the format a it is maintained for compatibility with previous versions of WebBase asCodedHtml e g f asCodedHtml gt amp 35 amp 36 amp 37 returns a copy of the receiver with all non alphanumeric characters encoded as per the HTML Coded Character set definitions amp n where n is the integer number of the ASCII character e g amp gt 38 asDate e g f 29 March 1997 asDate gt 03 29 97 returns a date representing the date described by the receiver The receiver can be in any of these formats Jan 2 1990 2 Jan 1990 or 02 01 90 with any sequence of non alphanumeric characters between the month day and year asDoubleQuoteString e g f string with quotes asDoubleQuoteString gt string with quotes returns a new string in which each occurrence of a double quote character has been doubled In SQL one often uses formats like xx something so the asSqlString routine is used to double the single quotes within something sql true to prevent syntax problems A similar situation exists when creating
449. returns the larger character when doing a sort order character comparison min e g f A X min gt A returns the smaller character when doing a sort order character comparison validHtmlChar e g f A validHtmlChar gt true f validHtmlChar gt false returns true or false depending on if the receiver needs to be converted for HTML use All alphanumeric characters and some punctuation characters return true Any character that must be encoded for use in a command line argument will return false 11 19 Booleans 208 There are only two instances of Boolean true and false There are many Boolean operations in the other sections that return a true or false value depending on the result of the computation These operations require the receiver to be a Boolean There are no class operations available for Booleans amp e g f yes yes no no amp gt true returns the logical AND of the receiver and argument e g f yes no no yes gt false returns the logical OR of the receiver and argument asBoolean e g f false 1 1 asBoolean true returns the receiver and ignores the argument This is provided for compatibility with the asBoolean operation available on strings asSglString e g f 1 1 asSqlString gt True returns the string True if the receiver is true or the string False if the receiver is false eqv e g f yes no no yes eqv g
450. rge dynamic variable can be modified by accessing the Options menu on the WebServer window However the change made by selecting this menu option is only valid for the current session When WebBase is stopped and restarted the default value will be restored If you want to permanently change the value of this variable it is recommended that you add a global variable with the desired value following the instructions in Chapter 9 The default value is shown in parentheses e mailLogEnabled e g true indicates that the mail log file functionality of WebBase is to be enabled This variable is very similar to the logEnabled WebBase parameter It is suggested that you specify the WebBase LogDirectory parameter and then turn mail logging on or off by setting this variable or using the menu option on the WebBase Server window Special Variables e mailMaxLines e g 100 this variable defines the number of lines of information to be displayed in the WebBase Mail Service Window By default 100 lines are displayed If mailMaxLines is created as a global variable with a value between 10 and 10000 this defines how many lines will be displayed in the window e SomailPostingEnable e g true this variable enables or disables posting of information into the WebBase Mail Service Window If set to false it will cause posting into the WebBase Mail Service Window to be disabled when the window is opened either automatically when a mail me
451. rguments may be used Chapter 8 Macros 92 Example 8 13 exit Macro forIndex anIx from 1 to 20 label foo lt BR gt anIx if anIx 5 lt BODY gt lt HTML gt exit if foriIndex lt H3 gt Here is the next thing lt H3 gt The above example would return the following results to the browser Oe GONE f lt exp gt The f macro evaluates the given expression and prints the result in place of the f statement The only valid argument with the f macro is a WebBase expression constants or variables cannot be used Note that there is no space between the f and but there IS a space between the f and the subsequent expression terms If the expression is written as f lt exp gt an error will result Example 8 14 f Macro add 3 to the number of results returned f 3 results size f lt exp gt This is very similar to the f macro The f macro is designed to evaluate an expression and return the results to be printed at the browser The f macro is designed to evaluate the expression but return an empty string so as not to alter the browser output by its inclusion in a form This is particularly for use in expressions like the example below which returns a file object that is typically of no use to the user The only valid argument with the f macro is a WebBase expression constants or variables cannot be used Note that there is no space between the f and but th
452. riable dictionary currently specified in userName This variable shows the contents of the user variable dictionaries for all user variable dictionary names including that specified in userName Details on user variables can be found in Chapter 10 The example below shows the information generated by this dynamic variable as displayed on a browser This particular display was generated by accessing the Sample Sites option under the WebBase WebWizard window as it uses user variables to set up the necessary sample sites Example 9 4 allUserVariablesHTML display eee Variables UW14259281E161808318469B 17 S accessed 03 10 97 05 46 49 AM e S altered true e S created3 03 10 97 05 46 44 AM e S expires 60 e Udirpath c http WB ShowMe e Ulogpath c http WB ShowMe WBSM_Log e UMSAdriver Dictionary FileExtns gt mdb FileUsage gt 2 Driver gt C WINDOWS SYSTEM odbcjt32 dl1l1 ConnectFunctions gt YYN APILevel gt 1 ConectFunctions gt YYN UsageCount gt 1 SQLLevel gt 0 Setup gt C WINDOWS SYSTEM odbcjt32 dl1l1 DriverODBCVer gt 02 50 e UmyDir c http wbwizard showme e UodbcDriver Microsoft Access Driver mdb e UodbcPaths Dictionary pds gt PDS MDB videos gt VIDEOS MDB cars gt CARS MDB 126 WebBase User s Guide e UodbcSources Dictionary pds g
453. rintOn inFormat twoDigitYear e g set strm String new WriteStream on f strm 2 false date printOn inFormat twoDigitYear f strm contents gt 1997 03 18 appends a string representing the receiver in the form specified by the second argument to the stream identified in the first argument The third argument is a Boolean that specifies whether the year should be printed in 2 digits or 4 See also printInFormat twoDigitYear e printOn inFormat twoDigitYear dateSeparator e g set strm String new WriteStream on f strm 2 false date printOn inFormat twoDigitYear dateSeparator f strm contents gt 1997 03 18 appends a string representing the receiver in the form specified by the second argument to the stream identified in the first argument The third argument is a Boolean that specifies whether the year should be printed in 2 digits or 4 the fourth argument is a string used to separate the month day and year portions of the date e printOn withPicture e g set strm String new YWriteStream on f strm MMM dd yyyy date printOn withPicture f strm contents Mar 18 1997 appends a string representing the receiver in the form specified by the second argument to the stream identified in the first argument See printWithPicture for format information e printWithPicture e g f MMM dd yyyy date printWithPicture gt Mar 18 1997 returns a formatted string displayed according t
454. ro here The standardName parameter is the name typically used to identify the time zone in your locale during either that time of the year when Daylight Savings Time is not in effect or the entire year if your locale does not adjust to Daylight Savings Time Examples of Standard Time Zone names from the USA are Eastern Standard Time Central Standard Time and Pacific Standard Time The first letters of these names are accessed to produce an abbreviation attached to the result of sending the date Time built in command to WebBase as in Date Mon 04 Dec 1995 02 48 11 PM CST If you wish you may enter just the abbreviation for your locale here with no embedded spaces The daylightName parameter is the name typically used to identify the time zone in your locale during either that time of the year when Daylight Savings Time is in effect If your locale does not adjust to Daylight Savings Time this field should contain the same value as the standardName field Examples of Daylight Savings Time names from the USA are Eastern Daylight Time Central Daylight Time and Pacific Daylight Time The first letters of these names are accessed to produce an abbreviation attached to the result of sending the dateTime command to WebBase as in Date Mon 08 Apr 1996 02 48 11 PM EDT If you wish you may enter just the abbreviation for your locale here with no embedded spaces NOTE If the above time zone information is not supplied WebBase will op
455. ro is used to test conditions In this example the if macro starts with if and ends with if It is used to determine the action to take based on the number of records returned by the query The first line of this section if 0 answers size tests the size of the WebBase variable answers If there are 0 answers the HTML immediately following the if statement is returned If there is at least 1 record returned the HTML immediately following the else statement is returned In this example there are 2 records returned from the database WebBase provides looping macros to iterate through multiple returns The forRow macro starting with forRow and ending with forRow loops on the records returned by the query and stored in the variable answers Field names defined in the database are referenced in the htf file as WebBase field variables The value of the field returned by the query will be substituted for the field name where it is used within curly braces In this example some of the field names in the database are Name Company City State Zip and Phone There may be additional field names in the database records whose contents are not used at this time e g SocialSecurityNumber As each record is processed the Name Company et al field variables take on different values As WebBase has been processing the file it has been building a stre
456. roblems you might encounter while WebBase executes The file need not exist at this time but the directory specified must exist before executing WebBase so the file can be created as specified The LogDirectory parameter specifies where in your local directory structure WebBase can write log files WebBase creates a log file each day and records the requests it processes These files are written into the directory you specify here Log files are named using the following scheme WByymmdd LOG where yy year mm month and dd day For example the log file for November 23 1995 would be named WB951123 LOG Leaving this entry blank will cause WebBase to skip the logging process You can specify this Log Directory and still disable logging via the WebBase Options menu if so desired You cannot enable logging however if you have not specified a Log Directory here The Default parameter is the name of the default file to be used when a directory is referenced The automatic defaults are default HTF and default HTM in that order You can enter a WebBase User s Guide 299 Appendix B Special Configuration Issues single file name or a series of files to be searched for in the order presented index HTM index HTML separated by commas If you enter an empty string then no default file will be searched for The Extension parameter specifies the default extension or extensions to append to a file name should the user enter what appears to b
457. rosoft Access ODBC driver problem Only a single SQL statement can be included within the sql macro However multiple sql macros can be placed within the same htf form It is very important that WebBase variables used in SQL statements be set up to match the expected data type in the database table Any WebBase variable that contains a string and will be written to a text or memo field must be enclosed in single quotes It is also strongly recommended that the parameter sql true be added to all text fields this ensures that any apostrophes in the string stored in the WebBase variable will be properly inserted into the database Any numeric value must be entered without single quotes A date or date time value must be entered by placing the sign before and after the variable In the example below the Name field in the database is specified to be a text field the Salary field is numeric and the StartDate is a dateTime field WebBase User s Guide 109 Chapter 8 Macros Example 8 45 sql Macro sql source mySQL user me password test INSERT INTO Employees Name Salary StartDate VALUES LastName sql true Salary theDate sql sql to aCltn source mySQL user me password test SELECT FROM Employees WHERE StartDate lt sdateTime sql Note The ODBC drivers do NOT return the number of records returned by a SELECT statement the user must
458. row The different sql types are described as part of the OdbcRowObject columnSqlTypes operation isNumeric e g f 1 examORH isNumeric gt true returns true if the column specified in the argument has a type of Number otherwise false The argument must be an integer isYesNo e g f 1 examORO isYesNo gt false returns true 1f the column specified in the argument has a type of Yes No otherwise false The argument must be an integer returns a string that prints enough dashes for columnLengths with one space between each WebBase User s Guide group of dashes This is used when formatting tabular output but not using features like the lt TABLE gt construct e printColumnNames e g f examORH printColumnNames gt ID Year Maker Model Cylinders Transmission Kind Color Mileage Price Air Cruise Category Country returns a string containing the names of the columns in a format similar to printColumnDashes 11 33 Registration Database The Registration Database can be used on 32 bit systems to access the System Registry The System Registry is organized like a Dictionary and the RegistrationDatabase is very similar to a dictionary There are several top level keys in the System Registry including HKEY_CLASSES_ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE and HKEY_USERS The value associated with each of these keys is another dictionary or RegistrationDatabase containing keys and values Each key value pair in the Syst
459. rowser will consolidate into a single space character unless within the lt PRE gt construct WebBase User s Guide e containsAnyString e g set cltnl one two three parseAt asOrderedCollection f clin threes containsAnyString true returns true if any item in the receiver collection contains the string specified in the argument otherwise false Matches are case sensitive Note that the receiver collection should contain strings e containsAnyStringlgnoreCase e g set clin one two three parseAt asOrderedCollection f cltnl THREES containsAnyStringlgnoreCase true returns true if any item in the receiver collection contains the string specified in the argument otherwise false Matches are case insensitive Note that the receiver collection should contain strings e containsInteger e g f 13 containsInteger true f 13 7 containsInteger gt false returns true if the receiver is a string representation of an integer otherwise false e containsNumber e g f 13 7 containsNumber gt true returns true if the receiver is a string representation of a number otherwise false e containsString e g f ello Hello containsString true returns true if the receiver contains the argument this method does a case sensitive comparison e containsStringChecked e g f apple fruit containsStringChecked gt f apple apple conta
460. rrors not programming errors escape lt label gt The escape macro allows one to escape from within a forIndex or forRow loop It can be used as an escape mechanism when for example your logic finds a condition within one of these loops under which you do not want to continue processing the loop but do not want to exit the entire htf form The escape macro can be called based on specific conditions within a loop and references the label associated with the loop from which the escape is to be made Processing continues with the first statement following the closing forIndex or forRow WebBase User s Guide WebBase User s Guide 91 If forIndex or forRow structures are nested an enclosed escape can escape from any level of depth It will escape to the first statement following the closing forIndex or forRow of the forIndex or forRow macro for which the label value matches the argument in the escape The label required argument must be identical to the value of the label keyword in the forIndex or forRow macro out of which you wish to escape A WebBase variable or expression cannot be used as the label value only literal values can be used Unique labels should be used for each forIndex and forRow macro that may be nested together The escape macro starts at the topmost forIndex or forRow and looks through the subsequent branches to find one with the matching label As soon as the label is found the escape is performed If t
461. rtup Form as if it had been CALLed by the call macro The only difference is that the Startup Form is CALLed by the WebBase Server itself and NOT by another HTF form This CALLed Startup Form is CALLed as if wait true were indicated the server waits for the form to complete before going on to process other forms It accepts any number of returned parameters passed back from either a return or exit macro in the CALLed Startup Form Since there is no browser involved in the running of this Startup Form the output returned from this form is displayed in the WebBase WebServer window An example of such output is Running StartupForm Startup htf 01 TOK StartupForm Startup htf complete The Startup Form is identified and the 01 OK was the first and only parameter returned by this form Additional returns would be displayed as 02 03 etc If the CALLed Startup Form would have returned text to a browser if CALLed from another HTF form initiated by a browser command that text will be displayed following the above in the same WebBase WebServer window This output can be used to visually verify that the Startup Form executed as expected An example is shown below using an errorProtect macro sending both normal and error return codes back to the server as appropriate WebBase will run a Startup Form each time it is launched if one is specified as a WebBase parameter and the specified file exists at the indicated location within th
462. s e g counter All WebBase variable names must start with an alphabetic character or a The dynamic variables and global variables provided by WebBase all start with a It is recommended that users create their variable names starting with alphabetic characters so it 1s easy to differentiate between user created and system provided variables A WebBase variable name cannot be the same as a WebBase reserved word the reservedWords dynamic variable is a collection of all the WebBase reserved words It is also important to remember that variables are CASE SENSITIVE i e counter and Counter are two different variables The search order for WebBase variables is Field variables Local variables User variables Global variables Dynamic variables APPS Notice that Local variables override User variables and User variables take precedence over Global variables and Global variables override Dynamic variables Because of this precedence order it is strongly recommended that you carefully select the names of any variables to ensure proper precedence For example preface all user variables with a U e g setUser Uname name WebBase User s Guide 115 Chapter 9 Variables 9 1 Field Variables 116 Field variables are variables whose names correspond to fields within a database record definition Variables representing database record field names must be specified exactly as the field names are returned by the OD
463. s 62 WebBase Total View Menu Bat cccseccccessscceesenceecesneeeeceeeeeeesnaeeccseeneeesseaeeeeseeaeeecsenneeeeesneeeeeseeeeees 63 WebBas Total View Optlons 2 cess A mada oebscaubocesstetoutt E eR e E eA aese aani 64 WebBase Total View Text Window c cccecessccceesnceeceeeeeeeeeeaeeeeeseaeeecseaeeecseaeeeeeseaeeeceenaeeeeseneeeeseeneeess 64 5 5 WebBase Heartbeat Window cccecesccceessceeeeesseeecesneeeeseaeeeceeaececeececesseaeecessnaeeecesaeeeeneaeeeeeeeaeeesseanees 65 WebBase Heartbeat Window Menu Bat cccssesscceeesseeecesneeeceseneeeceenneeecsseeecsseaeeeesenaeeeenseeeeseeneeeess 66 WebBase Heartbeat Text Window ccccccessssceceesneeeceenseeecseeeeceenaeecesenaeeecseeeeeeseaseeceenaeeeeseneeeeseaeeeess 69 Chapter 6 ODBC amp SOL 71 6 1 Open Database Connectivity indio ound india ound Andis cine atin 71 6 2 Structured Query Language iiem aisha E E a 72 SELECT cea lis aie ES tvs s il ahead 72 SELECT General Usage icons iodo ia assess haslabasateisaeidan aertiaes 72 SELECT WebBase Usage mi Mii eee Maite tee pennies 74 SELECT Jom Statements nal laca cin dass 74 INSERT dia 75 INSERT General Usage ivi sccsssisckvesisocseiaiaskdvss ions spas loess ss daha suandasasusecasdousp da sbavsetaspovanlassasendasssverdessy 75 INSERT WebBase Usas iia iaa 76 UPDATE aua a 76 UPDATE Ge er l Us aL umi iinei eurotee Tee euss oE io EE SEKTE SERS OS EEKE TEESE EAS ii 76 UPDAT
464. s 95 4 0 950 Ea Please deselect the WebBase components you do NOT want to install on your computer by unchecking the appropriate boxes below Press OK to continue press Cancel to abort the installation Disk Space Required 2732 k Free Space Remaining 243605 k vi le 1337 k IV Virtual Machine 1395 k Carcel In addition to allowing you to select specific program components the custom installation also gives you the option of whether the WebBase WebWizard should be installed The dialog shown in Fig 3 14 gives you the option of whether they should be installed Figure 3 14 Custom Install WebWizard Option Install WebWizard x The WebWizard TM contains a number of WebBase forms that might be useful in getting you started in creating your own WebBase application In addition a number of application packages including WebBase ExperLink TM and WebBase ExperForms TM are included for the benefit of users who acquire the LicensedFeatures key to activate these components All components will be installed in the C HTTP WbWizard subdirectory Help Skip WebWizard Abort 22 WebBase User s Guide All the WebBase WebWizard forms and files are installed in the WbWizard subdirectory within the directory specified as the Directory parameter Details on the WebBase WebWizard tools and utilities can be found in the WebBase WebWizard User s Manual Another option provided within the custom
465. s a local variable e global the resulting variable is stored as a global variable in memory only When WebBase is restarted the global variable will not exist unless the System Registry file is edited e user the resulting variable is stored in the user variable dictionary specified by the YouserName variable WebBase User s Guide 105 Chapter 8 Macros e cookie the resulting variable is stored as a cookie variable that will be returned to the browser when form processing is completed If the type of the variable is not specified the resulting variable will be a local variable within the current scope If scoping is used that means that the variable will not exist once the scope keyword is encountered The collapse option can be used in conjunction with any one of the other options If two or more of local global user and cookie are specified then resolution is done based on the order local user global and cookie Example 8 41 setString Macro setString imageFiles collapse Imagel gif Imagel gif Image2 gif Image2 gif setString setUser lt var gt lt val gt The setUser macro operates exactly as does the set macro except that it will store its name value pair in a user dictionary See Chapter 10 for information on user variables and user dictionaries The same variable indirection described above for the set macro can also be used for the setUs
466. s and social security number If there are user variables for the name address and social security number they are displayed If there are no user variables yet defined the fields are blank The first user accesses the form sees all blank fields and enters their name address and social security number This information is stored as user variables in the user variable dictionary whose name is theUserDict The second user accesses the form However this second user sees a form on which is displayed the first user s name address and social security number This is definitely not desirable The WebBaselD and nextCookield variables have been set up specifically for use with user variables to ensure that a unique value can be used as the name of the user variable dictionary Special User Variables The user variable dictionary is not actually created when the name of the dictionary is specified in YuserName The user dictionary is created when the setUser macro is processed and the appropriate user dictionary is not found in WebBase memory When a new user variable dictionary is created a number of special user variables are automatically written into the dictionary as follows e created contains a timestamp of when the dictionary was created WebBase User s Guide 159 Chapter 10 User Variables e accessed Yo contains a timestamp of the most recent read or write access to the dictionary expires t
467. s are displayed and you have the ability to use the Browse button to locate and specify an appropriate directory if the default is not suitable Figure 3 5 WebBase Directories Dialog WebBase Directories x Destination OCOY The WebBase application files will be installed in this directory required Browse WebWizard Directory The WebBase WebWizard example files will be installed required in this directory CAHTTP Browse Backup Directory The installation will back up any replaced files in this IV Make backups directory CxwebBaseiBACKUP Browse wo i 16 WebBase User s Guide The Destination Directory is where all the WebBase application files will be stored This includes the executable programs virtual machine components and any utility files It is recommended that this be a top level directory All WebBase program components must be placed into the same directory for the application to execute successfully The WebWizard Directory specifies where the subdirectory containing the WebBase WebWizard forms will be placed This is generally the same directory where all forms are placed for access by browsers It is possible to place the WebBase WebWizard forms into another subdirectory under the root forms directory If Make Backups is checked the identified directory is used to back up files that would otherwise be overwritten during the instal
468. s authenticated himself via Basic Authentication or if authentication has not been performed date the date and time of the request with timezone offset from GMT at the end The format is DD Mon Y Y Y Y hh mm ss HHMM request the request line exactly as 1t came from the client in the format method file httpversion The method could be GET HEAD POST or none The file contains the full file path and arguments of the requested file The file path is relative to the directory containing the WebBase forms The httpversion specifies the version number of the HTTP specification This will generally be HTTP 1 0 status the HTTP status code returned to the client three digits or if not available This is generally 200 indicating OK bytes the content length of the document transferred in bytes or if not available 18 R No web analysis too vendors available via the web that support one or more of the log file formats provided by WebBase WebBase User s Guide ls are provided by ExperTelligence or as part of the WebBase application There are a number of web analysis tools from other 251 Chapter 12 Features Extended Common Log File Format LogFormat 2 The Extended Common Log File Format is also acceptable to many of the commonly available Web analysis tools If no LogFormat parameter is specified this is the default log format style The text file containing the output in E
469. s available using the odbcDataSourcesRaw operation odbcDataSourcesRaw e g f Databaselnfo odbcDataSourcesRaw gt SortedCollection dBASE Files gt Microsoft dBase Driver dbf Excel Files gt Microsoft Excel Driver xls excell gt Microsoft Excel Driver xls FoxPro WebBase User s Guide 247 Chapter 11 Expressions 248 Files gt Microsoft FoxPro Driver dbf MS Access 7 0 Database gt Microsoft Access Driver mdb myAccess gt Microsoft Access Driver mdb Paradox Files gt Microsoft Paradox Driver db Text Files gt Microsoft Text Driver txt csv textExample gt Microsoft Text Driver txt csv returns a collection of all the ODBC data sources defined on the system This list includes all sources set up by the user as well as any virtual sources which are set up as part of the driver installation but are not actually associated with a database file The list of sources associated with actual files is available using the odbcDataSources operation odbcDataSourcesSQL e g f Databaselnfo odbcDataSourcesSQL gt OrderedCollection an OdbcRowObject returns an ordered collection containing OdbcRowObjects representing each ODBC data source This collection can be iterated through the using forRow macro to look at the information contained within each data source which includes the fields Data_Source_Name and Data_Sour
470. s of htf logic that could be used in many other htf files The argument filename is required and is the name of the file to be inserted It can be a string a variable containing a string or an expression that generates a string The valid formats for the filename are Chapter 8 Macros 96 e file htf or subdir file htf appends the filename string to the Directory parameter This format specifies a filename that is relative to the Directory parameter If multiple domains are specified this is the Directory parameter for the current domain in use e file htf or subdir file htf appends the filename string to the Directory parameter This format specifies a filename that is relative to the Directory parameter If multiple domains are specified this is the default Directory parameter specified in the HttpSQL Parameters key not the Directory parameter for the current domain in use If multiple domains are not in use this format is equivalent to the previous format e file htf or subdir file htf appends the filename to the directory of the current form This format specifies a filename that is relative to the directory in which the current form the one that contains the insert macro exists A variation on this format is file htf For each W sequence one moves up one level of directory from that in which the form doing the insert was located e 6 e dir subdir file ht
471. s properly displayed padchr a single character to be used as a padding character when aligning values in a field where the specified size is greater than the size of the value The default value is a space prefix a series of characters that will be prepended to the value of the variable preceded by one or more pad characters if the field requires padding size specifies the field width as an integer Results larger than the specified size will be truncated on the right while results shorter than the size will be aligned as specified by the align parameter and padded with the indicated padchr as necessary to fill out the field sql indicates that the variable will be used in a statement within an sq macro and must be checked for the inclusion of an apostrophe character SQL statements must have strings enclosed within apostrophes thus any strings that contain apostrophes must have these enclosed apostrophes represented by two consecutive apostrophe characters To accomplish this within a variable s value without requiring the user to enter two apostrophes for each one desired one must specify the parameter as in VarName sql true As a general rule of thumb forms designers should always include the sq true parameter on any WebBase variable containing a text string that is used in a statement within the sql macro Although one might not expect a variable to contain an apostrophe users will sometimes do the unexpected and enter a
472. s the device used during installation e g C and the directory http License required the value of your license number There is no default for this parameter The license number must be entered in the format FHt HHHHHT The hyphen in the center of the number is part of the license If it is not specified an error message will be displayed when you try to start WebBase LogDirectory optional the full pathname of a directory into which WebBase will write log files for each query made of the system Each day WebBase will create a new log file named WByymmdd log where yy year mm month and dd day For example WB970504 log is the log file for May 4 1997 These log files will contain one entry for each query made of WebBase The format and contents of the file are determined by the LogFormat parameter described below If the LogDirectory is not specified WebBase will not perform any logging It is recommended that this parameter always be specified logging can then be enabled or disabled via the WebBase Options menu if so desired It is not possible to enable logging if the LogDirectory parameter is not specified During installation the default for this parameter is the directory containing program files e g CAWebBase and the subdirectory Logs LogFormat optional the type of log format records that will be generated in the log files There are 5 types of log formats supported by WebBase
473. s variable is used when an error message is generated due to a form s designer programming error It is either true or false and determines whether color is used in the error display It defaults to false so no color is displayed If set to true the error line is displayed in red and the macro containing the error is displayed in blue All other code is displayed in black e errorWrapperLines this variable is used when an error message is generated due to a form s designer programming error It defines the number of lines to be displayed before and after the macro that contains the error to give more help in locating the offending code It defaults to 3 If a value less than 2 is specified the entire form is displayed within the error message e Q heartbeatInterval this variable defines the length of time in seconds between heartbeat commands The value entered must be between 5 and 360 seconds the default is 15 More information on the WebBase Heartbeat Window can be found in Chapter 5 e heartbeatMaxLines this variable defines the number of lines of information to be displayed in the WebBase Heartbeat Window By default 100 lines are displayed If heartbeatMaxLines is created as a global variable with a value between 10 and 10000 this defines how many lines will be displayed in the window More information on the WebBase Heartbeat Window can be found in Chapter 5 e M heartbeatPostingEnable this variable enables or disabl
474. se MAY do so by including an Authorization request header field with the request The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested See the section on Basic Authentication for more information on authentication and authorization e Cache Control used to specify directives that MUST be obeyed by all caching mechanisms along the request response chain The directives specify behavior intended to prevent caches from adversely interfering with the request or response These directives typically override the default caching algorithms Note this variable does not impact WebBase caching e Connection allows the sender to specify options that are desired for that particular connection and MUST NOT be communicated by proxies over further connections e Date the date and time at which the message was originated An example is Date Tue 15 Nov 1994 08 12 31 GMT e From if given this field SHOULD contain an Internet e mail address for the human user who controls the requesting user agent This header field MAY be used for logging purposes and as a means for identifying the source of invalid or unwanted requests It SHOULD NOT be used as an insecure form of access protection An example is From webmaster w3 org e Host specifies the Internet host and port number of the resource being requested as obtained from the original
475. se 4 10 Parameters RegistrationDatabase localMachine at aRegistrationDatabase returns a new RegistrationDatabase which spans out from the node named by the argument If the node does not exist an error is generated The following code will display all of the WebBase parameters as shown below the code set strm String new SWriteStream on set aCltn regDB entryValues forRow aRow on aCltn f aRow asString strm nextPutAll f strm cr WebBase User s Guide 239 Chapter 11 Expressions forRow f strm contents The results of the above are PortNo gt 80 LogDirectory gt C WebBase LOGS Directory gt C HTTP errorLogFile gt C WebBase LOGS WebError log LogFormat gt 2 e at put e g set assoc exampleKey exampleValue Association key value f SOFTWARE ExperTelligence Inc WebBase 4 10 Parameters assoc RegistrationDatabase localMachine at put gt exampleKey gt exampleValue returns the second argument after setting the value of the node named in the first argument to the value in the second argument This is used to set create update a name value pair within the specific registration database identified in the first argument e entryValues e g f regDB entryValues gt Dictionary PortNo gt 80 LogDirectory gt CAWebBasALOGS Directory gt C HTTP errorLogFile gt CAWebBasALOGSNWebError log
476. se User s Guide WEB 52 WebBase Windows E expertolligonce Chapter 5 There are a number of windows that are displayed on the host system while WebBase is running This chapter describes these windows and the menu options available on them Note that when WebBase is installed as a service under Windows NT there may not be any windows displayed 5 1 Late Breaking News Window The first window displayed when WebBase is started is the Late Breaking News Window An example of this window is shown in Fig 5 1 below Figure 5 1 Late Breaking News Window S Late breaking news from ExperT elligence Inc File Edit Help Copyright 1995 7 ExperTelligence Inc Welcome to WebBase 4 10 build 56 from ExperTelligence Inc Visit the WebWizard TM point your browser to http 127 0 0 1A bYizard to learn what WebBase can do for you Starting Server WebBase 4 10 build 56 The lines shown above are always displayed and include the copyright statement the welcome statement including the current WebBase version and build numbers and an indication that the server is starting The WebBase WebWizard information is displayed as long as the directory containing the WebBase WebWizard forms can be found on the server system The WebBase WebWizard is installed as part of the WebBase installation Information on the WebBase WebWizard is provided as readme txt files with each WebBase WebWizard tool additional documentation is av
477. se is processed The otherwise clause contains a block of text that is processed if no match clause condition evaluates to true If no match clause matches the case value and no otherwise clause is present the macro returns no text for processing Example 8 8 case Macro case results size match 0 no results returned lt H2 gt Sorry but I couldn t find a match lt H2 gt match 1 lt H2 gt Wow Exactly one match was found lt H2 gt otherwise lt h2 gt There were f results size matches found lt H2 gt case comment comment The comment macro allows the developer to insert commentary into the htf files that will not be sent to the browsers as part of the HTML The text contained between the comment and comment is skipped as WebBase processes the file Another valid comment macro format is comment statement The latter is useful for short in line comments within a htf form Note Since the purpose of the comment macro is to insert text that is to be skipped WebBase does not parse the information within the comment comment or 1 area For this reason after encountering the opening comment or WebBase scans for the first occurrence of an ending comment or WebBase does not support nested comment blocks Example 8 9 comment Macro comment This is commentary on this file and is not to be sent to the browser as is lt commentary gt so as never to be seen
478. ser HTTP 1 0 401 Unauthorized WWW Authenticate Basic realm User Verify The value returned by authentication in the variable Authorization looks like Basic VG9ktDptDWp1x3Q To more easily test for valid username and password matches the following operations are available These would all be sent to the variable Authorization created as outlined above e authValid returns true if the string is in fact a Basic authentication encoded string otherwise false It checks for the existence of the required Basic prefix and the colon separator required between the user name and password portions of the returned data e authUserName returns a string containing the User Name portion of the authorization The statement set uname Authorization authUserName will decode the returned Authorization variable and extract the User Name portion storing it in the variable uname e authPassword returns a string containing the Password portion of the authorization The statement set upass Authorization authPassword will decode the returned Authorization variable and extract the Password portion storing it in the variable upass The above operations utilize the authDecode operation that simply decodes the encoded authorization information in the Authorization variable into a string containing the username a colon and the password Thus an Authorization string of the form Basic WebBase User s Guide GdkLkk
479. serVariablesHTML 126 allUserVarNamesHTMLO 127 AOL 312 Array 124 186 Association 124 204 base 127 browserAddress 127 164 build 127 cacheEnable 258 cacheEnabled 52 55 135 147 cacheODBCO 53 56 148 258 cacheTimeCheck 55 148 258 cmd 127 244 command 127 commandCounter 127 commandsHTML 127 Jocomment 128 concurrentMailLimit 287 294 concurrentUsers 128 cookieDomain 104 122 128 314 cookieExpires 104 122 128 JocookielInVariables 128 cookieInVariablesHTML 129 cookieOutVariables 129 cookieOutVariablesHTML 129 cookiePath 104 123 129 cookies 130 cookieVariables 130 copyright 130 Databaselnfo 124 248 date 210 Date 124 214 JodateTime 218 debugAddresses 312 defaultExtensionsHTML 131 Dictionary 124 207 Directory 124 230 directoryBrowse 148 266 disableAllInternalCommands 149 domainDirectory 131 domainExtensionsHTML 131 domainsHTML 132 dumpVariablesOnError 149 dynamicVariableNamesHTML 132 enablePrivateInternalCommands 149 PEQ 133 err401 133 Joerr403 133 err404 133 err500 134 err501 134 err503 134 error 90 133 errorMacroLines 149 errorUseColor 149 errorVariableNotFound 312 errorWrapperLines 149 expire 134 256 File 124 226 filler 135 Float 124 178 form
480. set The value of expire in seconds is added to the current time in GMT and returned to the browser This value defaults to 0 If expire is set to 1 the Expires header parameter is not generated the form will never expire If the value is set to 2 the Expires header parameter is set to 12 00 01 on January 1 1900 It is recommended that expire be set to 2 to cause forms to be marked as expired WebBase User s Guide 255 Chapter 12 Features 256 However experience has shown that most browsers do not honor this Expire header parameter unless the page was accessed using the POST command Pages accessed via a GET seem to ignore this feature WebBase sends the expiration information in the header regardless of the command used to request the page The second approach is to generate unique command lines Browsers typically cache pages based on the command line sent to the server For a page referenced as http lt x gt foo htf it can also be referenced via http lt x gt foo htf x 1 where the x 1 is an argument that the page should ignore but it is part of what the browser uses to identify the pages in its cache For example http lt addr gt foo htf http lt addr gt foo htf x 1 http lt addr gt foo htf x 2 would all be considered different pages as far as the browser s cache is concerned If the page is not dependent upon the argument x they should all return the same result as http lt addr gt foo htf Here a
481. ss e g 127 0 0 1 the IP address of the browser issuing a query to the WebBase server e build e g 56 the build number of the WebBase server software e cmd e g an HttpGetN returns the instance of the internal command object that is processing the current form See Chapter 11 for the details on how to send messages to this variable e command e g GET getname htf name Denny the command line that was sent in from the browser including the type of request e g GET POST the path to the file to be processed and any command line arguments e 9 commandCounter e g 123 the count of the number of queries processed by WebBase since it was last started e commandsHTML e g see below formats the names of all the build in commands for a nice printout on the browser Each of the built in commands in the display are set up as anchors so that the corresponding built in command can be executed immediately These commands are described in Chapter 3 WebBase User s Guide 127 Chapter 9 Variables 128 Example 9 6 commandsHTML display Internal Commands build buildString dateTime elapsedTime gmt milliseconds seconds title titleString comment e g lt Processed by WebBase 4 10 build 56 TM by ExperTelligence Inc 04 17 97 21 55 31 gt the header comment returned in the data back to the browser for any form which WebBase processes Files which are returned but not processed by
482. ssage is processed manually via the Edit menu e concurrentMailLimit e g 0 this variable determines the number of concurrent mail processes that will be created The WebBase User s Guide 293 Chapter 16 E Merge 16 5 294 default value of O indicates that there is no limit on the number of processes Some mail servers have a limit on the number of mail requests they can handle See the previous section for more information on mail processes mailTrace e g false this variable determines whether each mail command processed will have trace information displayed in the WebBase Mail Service window By default tracing is disabled mailFullTrace e g false this variable works in conjunction with mailTrace If mailTrace is disabled then this value is not used If mailTrace is true then the value of this variable determines how much trace information will be displayed E Merge Operations There are two classes provided with WebBase E Merge Mail Lists and Envelopes The operations that users can make use of within forms development are described below Mail Lists A mail list is a special type of sorted collection that contains only envelopes each holding a mail message Mail List Instance Operations In addition to the operations that can be performed by sorted lists the following messages can be sent to the MailQueue or any other variable holding a Mail List Each message below will return a MailList
483. st and only parameter returned by this form Additional returns would be displayed as 02 03 etc If the CALLed Startup Form would have returned text to a browser if CALLed from another htf form initiated by a browser command that text will be displayed following the above in the same WebBase WebServer window This output can be used to visually verify that the Startup Form executed as expected The workaround for Access databases described in Chapter 14 shows how the startup form can be used e HTTP Proxy optional the name of the proxy host system This parameter is only used when the user is behind a firewall and wants to receive the Late Breaking News WebBase User s Guide 37 Chapter 4 Initialization from ExperTelligence when WebBase is started This is the name or IP address of the firewall system that WebBase is able to access HTTP_ProxyPort optional the port number of the proxy host system This parameter is only used when the user is behind a firewall and wants to receive the Late Breaking News from ExperTelligence when WebBase is started Windows NT Service Parameters The parameters described in this section are only required on Windows NT systems when WebBase is to be set up to run as a service They are automatically set up as part of the installation of WebBase on Windows NT systems AppDirectory required the directory in which the application and related virtual machine and
484. st image would be encoded EACH time it was sent out The second image was encoded prior to the mail macro and does not have to b ncoded with each sending mail E Merge Variables There are a number of dynamic variables specifically for WebBase E Merge that are described below WebBase User s Guide Dynamic Variables The WebBase E Merge dynamics variables are included on the list of the WebBase dynamic variables displayed in the WebBase Server window when WebBase is started The WebBase E Merge dynamic variables include e MailerStatus e g idle returns one of the following values as a string unavailable the WebBase E Merge feature is not available because it has not been enabled via a valid LicensedFeatures parameter inactive mailer has not been started or was exited by the user idle mailer was started but is currently idle no envelopes on the queue stopped mailer was stopped by the user active mailer is currently active sending mail from the queue e MailQueue e g MailList the actual mail queue A MailList is a special type of SortedList that responds to specific messages related to mail The queue contains envelopes relating to mail that is waiting to be sent MailQueue responds to the size message returning the number of envelopes currently on the queue It can also be placed in a forRow loop to process the individual envelope entries o Operational Variables The following WebBase E Me
485. started the next time the WebBase Mail Service Window is manually opened The display below shows the information displayed on the WebBase Mail Service Window when the Stop Mailer option is selected followed by the Start Mailer option Notice that two lines of information are displayed when the mail service is restarted one to indicate the status of the service and the other to provide information about what is in the queue In this case there were no messages in the queue to be processed Figure 16 3 Starting and Stopping Mail Service Display ES webBase 56 Mail Service 100 lines OF x File Edit Status 6 lt gt Queue empty 5 lt gt Service active as of Fri 11 Apr 1997 11 48 02 4 lt gt Service stopped as of Fri 11 Apr 1997 11 48 00 3 lt gt Service active as of Fri 11 Apr 1997 11 44 29 2 lt gt Service active as of Fri 11 Apr 1997 11 44 25 window disabled 1 lt gt Service active as of Fri 11 Apr 1997 11 34 22 e Status gt Set Mail Limit If this option is selected the dialog shown in Fig 16 4 is displayed The user is prompted to enter a number that how many mail processes will be created and used If O zero is entered there are unlimited mail processes Each time a new mail message is generated a mail process is created to handle the sending It is possible to saturate a mail server by sending it hundreds of simultaneous mail messages WebBase E Merge handles mail in an asynchronous fashion so e
486. stream The stream used in the following examples is generated using set wstrm String new WriteStream on e cr e g f wstrm cr gt a WriteStream returns the receiver after writing the line terminating character carriage return and line feed to it 232 WebBase User s Guide e nextPut e g f a wstrm nextPut gt a returns the argument after writing it to the receiver stream For write streams on strings the argument must be a character e nextPutAll e g f abc wstrm nextPutAll abc returns the argument a collection after writing each of the objects in it to the receiver For write stream son strings the argument can be a substring e space e g f wstrm space gt a WriteStream returns the receiver after writing the space character to it This is equivalent to f wstrm nextPut space e tab e g f wstrm tab gt a WriteStream returns the receiver after writing the tab character to it This is equivalent to f wstrm nextPut tab e tab e g f 5 wstrm tab gt a WriteStream returns the receiver after writing the number of tab characters specified in the argument to it Write Stream Class Operations The WriteStream variable represents the WriteStream class which can use the stream class operations described above There are no class operations specifically for this class 11 29 Read Write Streams A read write stream allows streaming over an indexed collection
487. subdirectory whose name includes spaces 7 2 Requesting Input on a Form Many of the WebBase forms that are developed either request information from the user in preparation for querying the database or present information back to the user after the query has been completed This section covers forms that request information from the user Information from a user is generally requested using the HTML lt FORM gt construct The form element can contain input selection and text area tags along with document structuring elements Form elements can be mixed in with document structuring elements For example a lt PRE gt element may contain a lt FORM gt element or a lt FORM gt element may contain lists that contain input elements This gives considerable flexibility in designing the layout of forms Each lt FORM gt statement has one required attribute ACTION This attribute identifies the file URL to which the form contents will be submitted A FORM may also have an optional attribute METHOD that defines whether a GET or a POST request will be made GET requests include all the command line arguments as part of the URL POST requests include the command line arguments as part of the request The INPUT tag represents a form field for user input These can appear in a wide variety of types including text password checkbox radio submit reset image and hidden Most INPUT fields will also have a NAME attribute specified This name and the
488. sussprcnaysaseued A 94 ik lt expo pels attics sictecheiact fet E E EE E E S E EE byeetasiate 95 ER aaea SIE ET er a AEE A 95 Output lt ares gt Output E a E A a EE TET 96 parallel paralela E E edeaeeee tae 97 II a5 cies TN 97 reDirect2 lt arg gt reDirect2 sticie a E E iaa ocio scans ein asienta 98 TEMOVE lt SVATINAINES gt Jota ii IAE T da 98 removeAll lt varNames ciao 99 removeCookie lt varNames gt cccsssccccesenceecessneeeesseeecessaeeeceseeeeeeeaeeeceenaeeeceeaeeeeseeaeeeeeseaseeseenneeeseeas 99 removeGlobal lt varNames gt 0 cccesesccceesseceeeseeeeceensececssaeeeceseaeeeceeeeeceseaeeecesnaeeecseaeeeeeenaeeeseeeneeeseege 100 remove Header lt varNaMes gt anio eii E A ia tada Eaa 100 removeLocal lt VirNames gt eddie 100 removeUser lt yarNames gt viii is cati coeds eveiies cate eE cond caesscuvedua souk cwunscevedaa coud cues esuvdden oad esvbesevsouncegeeeun sys 100 retume vals S ee a idilio 101 SCOPE SCOPE NN NO 101 UVAS A a dls 103 setEdokie var lt valS iia 104 s tGlobal lt var gt Valk anilla 104 setHeader lt var gt lt Vadl i528 setazcescceacissatscuessava teenduns tuossch aduendeds fuuseasaduendepaduceigeasuve debs tantra ooo sia Ea 104 Setocals lt y ars vals cc cess cs As visas acts tidvsaband craeds sodvaadeodsoasbssevandendcveedashsuacbnadevevdassseanbinesveebesssnsotaagevtededs 105 setString lt var gt lt options gt setString ceccccceessnceceesn
489. t e min e g set dtl 3 Y dateTime addDays f dtl dateTime min gt 04 11 97 09 35 21 returns the lesser of the receiver or the argument e minutes e g f dateTime minutes 30 returns the number of minutes past the hour Only the time portion of the receiver is used this is equivalent to f dateTime time minutes e monthIndex e g f dateTime monthIndex gt 3 returns the number of the month This is equivalent to f dateTime date monthIndex e monthName e g f dateTime monthName March returns the symbol identifying the name of the month This is equivalent to f dateTime date monthName e seconds e g f dateTime seconds gt 0 returns the number of seconds past the minute Only the time portion of the receiver is used this is equivalent to f dateTime time seconds e time e g f dateTime time gt 11 23 16 AM returns the time portion of the receiver e timeFromString e g f 8 00 00 PM dateTime timeFromString gt 03 19 97 20 00 00 returns a new Universal time in which the time is as specified in the input string The date is the same as the date in the receiver The time string MUST be in the format of the system clock If the system is set to a 12 hour format the time string must be in a 12 hour format with an uppercase AM or PM If the system is set to a 24 hour format the time string must be in a 24 hour format Because of these restrictions it is recommende
490. t cltn1 gt OrderedCollection one two three end returns the argument after adding it to the end of the receiver after e g f two cltnl after gt three returns the element that immediately follows the argument in the receiver If the argument 1s not found in the receiver an error is reported ascending e g f clin ascending gt SortedCollection one three two returns a SortedCollection containing all the elements of the receiver in ascending order asOptions e g set cltn2 lt apple banana cherry parseAt asOrderedCollection f banana cltn2 asOptions gt lt OPTION gt apple lt OPTION SELECTED gt banana lt OPTION gt cherry lt SELECT gt the receiver is a collection of strings of options as would be found on an HTML list box The input argument is the option which is currently selected A string is returned that is properly formatted for HTML to identify all the options and which particular option is currently selected asOptions field e g sql to answers SELECT sql f banana FruitType answers asOptions field gt lt OPTION gt apple lt OPTION SELECTED gt banana lt OPTION gt cherry lt SELECT gt the receiver is a collection of ODBCRowObjects as returned from a SELECT query The first argument is the option which is selected the second argument is the name of the field within the database record Returns a new string that is properly formatte
491. t Web_Start_Pds videos gt Web_Start_Videos cars gt Web_Start_Cars e UserToken UW14259281E161808318469B e Usitelname Personnel Directory Service e Usite2name Used Cars Site e UsiteDict Dictionary pds gt Personnel Directory Service videos gt On Line Videos cars gt Used Cars Site UsitesDir c http wbwizard showme sit UsubDirs SortedCollection http wbwizard showme sit cars cars http wbwizard showme sit pds pds http wbwizard showme sit videos videos e 9 allUserVarNamesHTML e g see below formats the names of all user variable dictionaries currently created for a nice printout on the browser Only the names of the dictionaries are presented here the contents of all the user variable dictionaries can be viewed using allUserVariablesHTML or YouserVariablesHTML for the specific user variable dictionary defined in YouserName Details on user variables can be found in Chapter 10 The example below shows the information generated by this dynamic variable as displayed on a browser Example 9 5 allUserVarNamesHTML display Current User Variable Dictionaries 1 e UW14259281E161808318469B e base e g http 127 0 0 1 returns the URL including the directory and subdirectories where the form requested by the browser is located The server address specified in the URL is that which was used in the form request e 9 browserAddre
492. t a returns the first element of the collection For strings the value returned is a character In order to return the first character of a string as a string you must use f Hello first asString gt H e hasMessage e g f clin hasMessage gt false returns true if one or more of the members of the receiver is an ODBCRowObject which has an associated message e includes e g f two cltn1 includes true f d strl includes false returns true if the collection includes the specified element otherwise false e indexOf e g f two cltnl indexOf 2 f d strl indexOf gt 0 returns an integer defining the index position of the specified element argument within the receiver If no such element is found return 0 e indexOfCollection e g f cltn2 cltn1 indexOfCollection 0 f be strl indexOfCollection gt 2 returns an integer defining the index position of the first occurrence of the collection argument within the receiver If no such collection is found return 0 e isEmpty e g f clin isEmpty gt false f isEmpty gt true returns true if the receiver does not contain any elements otherwise false e last e g f clinl last gt three f strl last gt c returns the last element of the collection For strings the value returned is a character In order to return the last character of a string as a string you must use f Hello last asString
493. t 4 10 returns a new association whose key is set to the first argument and whose value is set to the second argument 11 17 Dictionaries A dictionary is a collection of key value pairs of objects The keys in a dictionary are unique whereas values may be duplicated A dictionary may be searched either by key or by value Key searches use hashing for efficiency Dictionary Instance Operations This section describes all the operations that can be performed on a dictionary For the examples in the following we will use an example dictionary dictl containing the two example associations used in the preceding section This dictionary is created using set dict Dictionary new f assoc dictl add f assoc2 dict add dictl gt Dictionary 56 4 10 add e g set assoc3 Title title Association key value f assoc3 dictl add dictl gt Dictionary WebBase 4 10 Build 56 56 4 10 returns the argument after adding it to the receiver Note that the argument is an association addAll e g set assoc3 Title title YAssociation key value set assoc4 Company ExperTelligence Inc Association key value set clin assoc3 assoc4 OrderedCollection with with f cltn1 dictl addAll dictl gt Dictionary Title gt WebBase 4 10 build 56 Build gt 56 Company gt ExperTelligence Inc Version gt 4 10 WebBase User s Guide 203 Chapter
494. t true returns true if the receiver is equivalent to the argument otherwise false not e g f yes no not gt true returns the inverse of the receiver WebBase User s Guide xor e g f yes no no yes xor gt false returns true if the receiver is not equivalent to the argument otherwise false 11 20 Dates A date represents a particular day since the start of the Julian calendar The dynamic variable date returns the current date Date Instance Operations The following messages can be sent to any WebBase variable containing a date For the following examples assume date 3 18 97 lt e g set datel 2 10 97 asDate f date datel lt gt true returns true if the receiver is less than the argument otherwise false lt e g set datel 2 10 97 asDate f Yodate datel lt gt true returns true if the receiver is less than or equal to the argument otherwise false e g set datel 2 10 97 asDate f Yodate datel gt false returns true if the receiver and argument are the same date otherwise false gt e g set datel 2 10 97 asDate f Yodate datel gt gt false returns true if the receiver is greater than the argument otherwise false gt e g set datel 2 10 97 asDate f date datel gt gt false returns true if the receiver is greater than or equal to the argument otherwise false addDays e g f 20 date addDays 04 07 97 ret
495. t all user variable dictionaries and their contents should be deleted the user variable dictionaries are emptied and removed See Chapter 10 for additional information on user variables and user variable dictionaries This option should be used only during form development and when no users are actively making requests of the WebBase server If one or more form applications have been developed using user variables and the user variable dictionaries are emptied and deleted any user currently interacting with the server may get unexpected results or errors Remove All User Variables Confirmation Dialog Please Confirm 9 Removing All User Variables WY will immediately remove the 1 User Variable Dictionary that currently exists Remove All User Variables Clear Forms Cache If this option is selected the confirmation dialog shown in Fig 5 8 is displayed If the user confirms that all the forms in the cache should be cleared the forms are removed Forms caching is enabled via the Options menu Enable Cache Read or by setting the value of cacheEnabled to true default value Forms caching can be disabled via menu option or by setting the value of cacheEnabled to false If forms caching is disabled no forms will be in the cache so it is not necessary to clear them It is strongly recommended that forms caching be used When a file is specified as part of a URL WebBase located the file on disk opens and reads the file parses the
496. t command or by closing the WebServer window check the file specified in the errorLogFile parameter for a message that may indicate why the application shut down There may be a copy of WebBase already up and running in your environment Check the task list for V32VM20 exe and if found kill this task before trying to launch WebBase again e Symptom As soon as WebBase is launched it quits with an entry of the form Error 11003 WSANO_RECOVERY No recoverable errors FORMERR REFUSED NOTIMP Possible Solution There is a problem with the TCP IP or name service communications software This problem is generally only seen on 16 bit systems and is due to a TCP IP package that is not compatible with WebBase The 32 bit systems supported by WebBase include TCP IP as part of the default operating system and they do not report this problem Testing WebBase Communications Now that WebBase is running you can check that it is communicating as a Web Server using one of the built in commands This can be done before you set up any database interfaces or begin designing any htf files An easy built in command to use is dateTime Additional built in commands are described in the following section From a browser access WebBase by entering the following URL http lt your host address gt lt your port number gt dateTime where e lt your host url gt is the IP address of the WebBase server machine You may also use 127 0 0 1 as the address that po
497. t exist This will cause the browser to inform the user that authentication failed and see if they want to try again If they cancel at this point the text within this portion of the case block is displayed The specific HTML to be displayed to the user on cancel is user specific the following is just an example comment lt HTML gt lt HEAD gt lt TITLE gt LOGIN FAILED lt TITLE gt lt HEAD gt lt BODY gt lt CENTER gt lt H1 gt LOGIN HAS FAILED lt H1 gt lt P gt lt P gt WebBase User s Guide 263 Chapter 13 Security 264 lt A HREF login htf gt TRY AGAIN lt A gt lt P gt lt P gt lt BODY gt lt HTML gt set Authenticate User Verify exit otherwise comment A match was found in the database so allow the user to go toa protected page comment reDirect protectedPage htf exit case if comment The user pressed the Cancel button on the initial Authentication window Display some appropriate HTML to the user comment lt HTML gt lt HEAD gt lt TITLE gt LOGIN FAILED lt TITLE gt lt HEAD gt lt BODY gt lt CENTER gt lt H1 gt LOGIN HAS FAILED lt H1 gt lt P gt lt P gt lt A HREF login htf gt TRY AGAIN lt A gt lt P gt lt P gt lt BODY gt lt HTML gt Setting the variable Authenticate tells WebBase to send the brow
498. t name used within a URL that is done by the TCP IP configuration where the domain name s are set up outside of WebBase This HostName parameter is only used so that if the user wants to do a redirect to a particular domain that the name of the domain can be used in the URL instead of the IP address Creating and Editing Multiple Domains Each domain to be serviced by WebBase is created as a separate entry within the System Registry Under this key are additional subkeys to specify aliases extensions and other parameters If multiple domain information is modified WebBase must be stopped and restarted for the change to take effect To create and or edit multiple domains in WebBase perform the following steps 1 10 11 Start WebBase and open up the WebBase WebWizard by entering the URL http 127 0 0 1 lt port gt wbwizard The lt port gt is the PortNo parameter If port 80 is used the lt port gt portion of the above URL does not have to be used Select the Registration Database anchor From the pull down list select HKEY_LOCAL_MACHINEP and then press the OPEN button Select the Open anchor next to the SOFTWARE key Select the Open anchor next to the ExperTelligence Inc key Select the Open anchor next to the WebBase key Select the Open anchor next to the version number e g 4 10 If the key Domains does not exist create it by selecting
499. table This must include the field names in row 1 You can include empty rows which will give you room to insert new records Within Excel from the Insert pull down menu select Name and then select Define Enter an appropriate name for your table e g Employees 4 Close the workbook 5 Set up your Excel ODBC source following the general instructions in Chapter 3 and point it to the workbook file 6 Write your htf file to access the source name entered in step 5 and the table name entered in step 3 7 Invoke the htf file and you should be able to access the records You cannot have any empty columns in the selected table columns without a field name for them You can have empty cells within a column but the column must have a name in row 1 It is also recommended to include empty rows at the bottom of the table This is equivalent to having null records in the database that can be filled in at a later date WITHOUT having to go back into Excel and redefine the table to contain new records that may have been added via an INSERT 14 6 FoxPro Database Issues 276 The FoxPro database does not support the DELETE command in the same fashion as other databases Instead of actually deleting the record from the database it simply flags the record as being deleted This flag is implemented as just another field in the record When performing a SELECT the ODBC driver does not check this particular delete flag
500. taining htf form must specify the name of the user dictionary currently in effect before the variable is referenced The search order for WebBase variables is Field variables Local variables User variables Global variables Dynamic variables A rege a Notice that local variables can be used to mask user variables user variables can be used to mask global variables and global variables in turn can be used to mask dynamic variables WebBase User s Guide Persistent User Variables User variable dictionaries provide state across multiple forms In general however they will eventually expire and be removed from memory in typical WebBase installations If the form designer wishes to make the contents of a user dictionary persistent the variables in the dictionary can be written to a database using the sql macro In like fashion a user dictionary can be created and populated with the results of reading a database via htf SQL For example imagine an application that requests information from the user such as their name address and e mail address Once this information is entered it is stored in user variables A unique token is created as the name of the user variable dictionary this token is sent to the browser as a cookie An expiration date is also specified for the cookie so that it will not expire and be removed from the browser for 1 year If the browser does not support cookies this information is just discarded If the
501. tarts with an entry number When the window is first displayed the first entry number is 1 As each additional entry is added to the window the entry number is incremented The number of entries maintained in the text area will not exceed the number of lines that the user has specified in the Set Lines menu option The information displayed after the entry number may be heartbeat command reply details status information or error information When the window is opened the first entry is always of the form 1 lt gt Service active as of Fri 14 Mar 1997 15 33 19 When heartbeat commands are sent out and replies received the information displayed is the ID of the command and whether it is being sent or received Here is an example of a heartbeat command sent and received 190 lt gt 8 id 7873913 received 7873913 189 lt gt 8 id 7873913 sending If the heartbeat function detects no response to a command which has been sent out the following messages are displayed 119 lt gt Heartbeat Restarting the TCP IP Socket Interface 118 lt gt Heartbeat No response from server The bottom line would appear immediately above a sending line The top line will occur 1f the user has indicated that the TCP connection should be restarted 1f a no response reply 1s received Other information displayed in the text area has been previously described in conjunction with the different menu options available on the
502. te either of the join formats displayed above INSERT The INSERT statement is used to create a new row of data in a table INSERT General Usage It is not necessary that all fields be specified at the time the row of data is created For most databases it is strongly recommended that one field contain a unique value e g primary key This field should be defined when the new row is created Note Some databases include an AutoNumber data type which can create a unique number for each new record added to the table For those users just learning about SQL and databases and WebBase if your database includes this data type it is recommended that an id field using this data type be set up for each table If all the field values for the new row will be specified the following statement can be used to create a new car record in the table INSERT INTO Cars VALUES 4 1994 SATURN SL2 5 Speed 4 Door Red 50000 13000 00 A new row is created and then populated on a column by column basis using the information passed in as VALUES Often however not all of the information to be stored in the fields will be known when the record is to be created To create a record in which only some of the fields will be populated the following statement is used INSERT INTO Cars ID Year Make Model Miles Price VALUES 4 1994 SATURN SL2 50000 13000 00 Chapter 6 ODBC amp SQL 76 All of the fields to be p
503. teFile The writeFile macro surrounds text that is first processed by WebBase to substitute for variables and expressions The resulting string is then written to the indicated file The file can be specified in any of the formats as described for the insert macro The optional keyword value pairs for this macro are shown in the table below append Boolean If true the resulting string will be appended to the specified file If false default the data in the file will be overwritten Example 8 49 writeFile Macro writeFile myfile txt append true I am going to add this text to the end of the file myfile txt It will include the current sdateTime and the address of the browser browserAddress that called me along with some other interesting WebBase variables etc writeFile WebBase User s Guide 113 Chapter 8 Macros 114 WebBase User s Guide WEB 52 Variables ExperTolligence Chapter 9 WebBase variables let you access store and display data within a WebBase htf file Browser GET or POST requests might include input variables the author can define local variables and access global variables and database queries will result in field variables WebBase also has a number of dynamic variables that can be used in the htf form Variables are expressed as alphanumeric names e g counter They are distinguished from string constants by the fact that string constants are enclosed in single quote mark
504. teTime date firstDayOfMonth firstSundayIn e g f 3 dateTime firstSundayIn 61 returns the number of days after the start of the year for the first Sunday within the month for the specified index This is equivalent to f 3 dateTime date firstSundayIn firstSundayInMonth e g f dateTime firstSundaymMonth 61 returns the number of days after the start of the year for the first Sunday in the current month This is equivalent to f dateTime date firstSundayInMonth gmt e g f dateTime gmt gt 03 19 97 19 23 16 returns a new UniversalTime with the date and time in the GMT time zone hours e g f dateTime hours gt 13 returns the number of hours from midnight until the specified time Only the time portion of the receiver is used this is equivalent to f dateTime time hours lastSundayIn e g f 3 dateTime lastSundayIn gt 89 returns the number of days after the start of the year for the last Sunday within the month for the specified index This is equivalent to f 3 dateTime date lastSundayIn lastSundayInMonth e g f dateTime lastSundayInMonth gt 89 returns the number of days after the start of the year for the last Sunday in the current month This is equivalent to f dateTime date lastSundayInMonth WebBase User s Guide e max e g set dtl 3 dateTime addDays f dtl Y dateTime max 04 14 97 09 35 21 returns the greater of the receiver or the argumen
505. ted by dividing the receiver by the argument rounded e g f 12 7 rounded gt 13 f 12 3 rounded gt 12 returns the nearest integer to the receiver roundTo e g f 5 17 roundTo 15 returns a number representing the receiver rounded to the nearest multiple of the argument sign e g f 12 sign gt 1 f 12 sign gt 1 returns 1 1 or O identifying whether the receiver is positive negative or zero respectively sin e g f 1 sin gt 0 84147098 returns the sine an angle in radians of the receiver sqrt e g f 25 sqrt gt 5 0 returns a number representing the square root of the receiver WebBase User s Guide squared e g f 3 squared 25 returns a number representing the square of the receiver strictlyPositive e g f 3 strictlyPositive true f 0 strictlyPositive gt false returns true if the receiver is greater than zero otherwise false tan e g f 30 tan gt 6 4053312 returns the tangent an angle in radians of the receiver timesTwoPower e g f 3 5 timesTwoPower gt 40 0 returns the result of multiplying the receiver by 2 to the exponent identified by the argument truncated e g f 12 7 truncated gt 12 f 12 3 truncated gt 12 returns the integer portion of the receiver any fraction is dropped truncateTo e g f 6 17 truncateTo gt 12 returns an integer that is the receiver truncated to the nearest multiple of the argument 11 4 Integers
506. ter 3 This chapter describes the installation procedures for WebBase The first section describes the necessary prerequisites that must be met before WebBase can be installed Subsequent sections describe the installation of WebBase the registry parameters required for WebBase to execute ODBC installation and configuration testing the WebBase installation using built in commands the optional configuration of WebBase as a Windows NT service and how to get updates and support 3 1 System Requirements WebBase requires a computer with e An Intel processor e One of the following operating systems Windows NT 3 51 or greater Windows 95 Windows 3 1 with Win32s Windows for Workgroups 3 11 with Win32s TCP IP software installed and configured At least 16MB of memory 32mb recommended A network connection typically Ethernet An ODBC compliant database and appropriate ODBC driver s See chapter 6 for information on ODBC databases l WebBase is a 32 bit application primarily designed for 32 bit operating systems such as Windows NT and Windows 95 It will run on 16 bit systems Windows 3 1 or Windows for Workgroups 3 11 however some of the add on features are not supported under 16 bit systems All installation instructions are for 32 bit systems Instructions for 16 bit systems are found in Appendix B TCP IP software is included with Windows NT and Windows 95 systems For Windows 3 1 and Windows for Workgroup systems
507. text into internal structures and then processes the macros and variables within the file The resulting output stream is returned to the browser If forms caching is on the internal structures built for the file are cached in memory When the file is subsequently requested the internal structures are retrieved from cache WebBase does not have to find the file read it and parse it This can provide improved throughput and faster response It is possible to clear both the forms cache and the ODBC connection cache using the Clear All Caches menu option Figure 5 8 Clear Forms Cache Confirmation Dialog 52 Please Confirm y Clearing the Forms Cache will remove 2 all forms from the cache All forms will be accessed from the file system and if caching is enabled added back to the cache when read The status of forms caching as set in the Options menu will not be altered Clear Forms Cache e WebBase User s Guide Figure 5 9 Clear ODBC Cache If this option is selected the confirmation dialog shown in Fig 5 9 is displayed If the user confirms that all the ODBC connections in the ODBC cache should be cleared the connections are removed ODBC connection caching is enabled via the Options menu Cache ODBC Connections or by setting the value of Z cacheODBC to true default value ODBC connection caching can be disabled via menu option or by setting the value of cacheODBCO to false If ODBC connection caching is disable
508. th the information from the database If no match is found then the blank form is displayed and the user has to re enter his information This situation may occur if the user is on another system is behind a firewall or is going through a provider that generates different IP addresses for each session Once the user enters the information again yet another SQL SELECT query can be done This time the query checks to see if a match exists between the e mail address entered by the user and entries in the database E mail addresses are also quite unique and can be used to help identify a user If a match is found in this fashion then once again the user variable dictionary is created populated and the user can resume his interactions with the forms A judicial use of user variable dictionaries and SQL maintenance of these dictionaries in a database provides a very wide range of capabilities with respect to developing Web pages that are highly interactive and carefully tailored to a given user s needs WebBase User s Guide 163 Chapter 11 Expressions WEB Vas LN pal 5 2 Expressions ExperTolligence Chapter 11 Expressions are used in macros for math tests string manipulation and more WebBase expressions are in a FORTH Like or Reverse Polish Notation RPN format This chapter provides a description of RPN and how it is used in expressions The remaining sections cover all the different types of WebBase data types th
509. th to base gt 146 returns a string representing the receiver padded on the left with the character specified by the first argument to be at least the number of characters as specified in the second argument The third argument specifies the base of the result printStringRadix e g f 3 529 printStringRadix gt 3r201121 returns a string containing a text description of the receiver with the radix specified by the argument radix e g f 3 529 radix gt 3r201121 returns a string representing the receiver with radix specified by the argument radix showRadix e g f 3 true 529 radix showRadix gt 3r201121 f 3 false 529 radix showRadix gt 201121 returns a string representing the receiver with radix specified by the argument If the second argument is true include the radix prefix WebBase User s Guide Integer Class Operations The Integer class is accessed using the variable Integer The following operations can be performed on this class readFrom e g f 123 asStream Ylnteger readFrom gt 123 reads an integer from the stream argument and returns the integer Note that the argument must be a stream and not a string 11 5 Floats This section describes all the operations that can be performed on floating point numbers Floats can also perform any of the operations described in the General Number Operations section above Float Instance Operations Floating point numbers
510. that is to be printed and not processed by WebBase WebBase does not parse the information within the output output area For this reason after encountering the opening output keyword WebBase scans for the first occurrence of an ending output keyword WebBase does not support nested output blocks The example below would output lt TITLE gt systemName lt TITLE gt at the browser and NOT set the browser s title to the value of the variable systemName Example 8 22 output Macro output convert true lt TITLE gt systemName lt TITLI output E v parallel parallel The parallel macro sets up a placeholder for a semaphore Within the parallel parallel statements one can have multiple fork statements each of which forks off a separate process within WebBase and ties their completion to the semaphore of the enclosing parallel structure Logically picturing it one starts off all these fork blocks then sits and waits at the parallel for them all to complete This was primarily developed to allow multiple GET and POST operations to be running simultaneously waiting until all complete However the parallel macro is not limited to that use Note The parallel and fork statements form a static structure and the fork statements must be within the top level scope of the parallel statement i e they cannot be within another nested structure within the parallel like a forRow or forIndex Examp
511. the WBUpdate exe program As in the initial installation of WebBase the installation process includes a series of dialogs requesting necessary information from you providing you with suitable defaults for most installations and providing Help facilities throughout the process should questions arise At any stage of the update process you can Abort the update the installer will remove any WebBase and or temporary installer files it has already installed leaving only the WBUpdate exe file that you downloaded The WebBase update installation starts with a welcome screen very similar to that used in the standard installation as shown in Fig 3 16 below WebBase User s Guide 23 Chapter 3 Installation Figure 3 16 WebBase Upgrade Installation Screen Welcome to WebBase TM Ea This program will update WebBase by installing WebBase 4 10 Build 56 onto your Windows 95 4 0 950 system Only the WebBase application W E B executables files will be installed it is Pu assumed that all other WebBase F N gt components are already installed al BRO Visit http www ExperT elligence com WebBase for more information and or to report problems Press to begin the installation Press Exit to quit this program now 1995 7 ExperTelligence Inc All Rights Reserved Unlike in an initial installation of WebBase it is important to understand the impact of the update installation on any currently executing versio
512. the browser sent to the server in an encrypted fashion 13 2 Directory Browsing WebBase can allow directory browsing of files and subdirectories in the path defined by the Directory parameter of the machine hosting WebBase By default directory browsing is disabled To enable this feature a global variable directoryBrowse must be created with the value true See Chapter 9 for information on adding and editing global variables Setting this variable to true enables the directory browsing capability within WebBase When the user references a directory pathname via a browser WebBase will return a listing of the files and subdirectories in that directory if it does not find a default file present to return and if browsing has been enabled To enable directory browsing but restrict access to specific directories a file named NOBROWSE note no extension is created in the directory to be restricted The contents of this file are immaterial the existence of a file with the name NOBROWSE is what restricts WebBase from displaying the directory contents of the containing directory The parent directory entry and any subdirectory entries that contain NOBROWSE files within them will cause these entries to not be shown in the listing of the directory being browsed If a user should explicitly reference a directory containing a NOBROWSE file and general directory browsing is enabled via the directoryBrowse variable being set true th
513. the day first argument month second argument and year third argument e dayNames e g f Date dayNames gt Dictionary Fri gt 5 Sunday gt 7 Wednesday gt 3 Friday gt 5 Sat gt 6 Tue gt 2 Saturday gt 6 Monday gt 1 Thr gt 4 Tuesday gt 2 Thursday gt 4 Wed gt 3 Mon gt 1 Sun gt 7 returns a dictionary The key of each association is the day name as a symbol and the value is the index of the day 1 Monday Note there is an association for the full name and the short name of each day of the week e g Mon Monday e dayOfWeek e g f Mon Date dayOfWeek gt 1 returns an integer from 1 to 7 indicating the weekday number for the symbol argument 1 Monday 7 Sunday Note the argument may be the symbol for either the short or full name of the day e daysInMonth forYear e g f April 1997 Date daysInMonth forYear gt 30 returns the total number of days for the month specified with the symbol in the first argument in the year specified in the second argument e daysInYear e g f 1997 Date daysInYear 365 returns the total number of days for the year specified in the argument e fromDays e g f 1000 Date fromDays gt 09 28 03 note this is 1903 not 2003 f 1000 Date fromDays gt 04 06 98 note this is 1898 not 1998 returns a date that is the number of days specified in the argument before or after January 1
514. though not totally eliminate this Too many client tasks limitation without requiring users to disable the ODBC Connections Cache Users facing this Too many client tasks limitation can set a variable called clearCacheAndRetryOnConnectionError to true the default condition is to assume this variable is set to false including when the variable itself does not exist This may be a local variable defined within a given htf form or a global variable set in the System Registry or WebVars ini file If set as a local variable the condition will apply for that one form only if as a global variable for all forms unless overridden locally When WebBase attempts to make a new ODBC connection because it did not find an available appropriate connection in its ODBC Connections Cache the above Too many client tasks error is returned when this limit is reached At this time if oclearCacheAndRetryOnConnectionError is found to be set to true WebBase will clear the ODBC Connections Cache of all cached connections and try making the requested new connection a second time Assuming the ODBC Connections Cache contained at least one idle connection to an ODBC source serviced by the Jet database engine clearing the cache will make available the needed connection and the second attempt should succeed If either the variable Y oclearCacheAndRetryOnConnectionError was not found to be set to true or the second attempt at connecting to the data source fails t
515. ting variables of the same name if this file were inserted into existing code without one realizing what was in it Using the scope macro these variables will not exist after the insert file is completed There are two other interesting features in this insert file First the setString macro is used at the top to act like a output off on wrapper This effectively turns off output without having to explicitly know whether the main form had the output status set to true or false Nothing is added to the output being generated for the browser as the result of inserting this file and the output variable status is not affected The second interesting feature is the use of the return macro that is returning values indicating success or failure of this routine If it is successful two values are returned 1 the Boolean true and the second the pathname passed in of the directory that was created If an error occurs during the create process three return values are returned 1 false 2 pathname 3 error message string To query the returns from an insert subroutine such as this the returns variable can be used as in the following if Sreturnss first successful else rror f 3 Sreturns at if Example 8 33 scope Macro create the necessary directories for the pathname in DIR_ 1 scope errorProtect if DIR_ Directory exists not set DIR_1 1 DIR_ pathnameDOS parseAt set DIR_2 forRow DIR_3 o
516. tion It has access messages to get or put the object s at the current position and cause the position to be advanced Messages are defined for changing the stream position so that random access is possible Stream Instance Operations The following methods can be sent to an instance of any type of stream Be sure to review the use of the ensure macro when using these methods It is important that any files opened also be properly closed In the examples below the stream in use will be a file stream on the file c http wbwizard default htf generated using set strm c nttp wbwizard default htf File pathNameReadOnly atEnd e g f strm atEnd gt false returns true if the receiver is positioned at the end beyond the last object otherwise false close e g f strm close gt a FileStream on default htf returns the receiver after closing it contents e g f strm contents gt lt see below gt returns the collection over which the receiver is streaming The contents of the example file are set Soutputs false 1997 ExperTelligence Inc All Rights Reserved reDirect2 Wizard htf Sbase appendFilename pathnameUNIX now seconds reDirect2 copyFrom to e g f 15 42 strm copyFrom to false 1997 ExperTel returns the subcollection of the collection over which the receiver is streaming from the starting position first argument to the ending position second argume
517. tion Only numeric values in the collection will be processed non numeric values will be skipped notEmpty e g f clin notEmpty gt true f notEmpty gt false returns true if the receiver does contains any elements otherwise false Equivalent to isEmpty not nums e g f numCltn nums gt 3 returns the number of list items that are numbers occurrencesOf e g f two cltnl occurrencesOf gt 1 f A strl occurrencesOf gt 0 returns the number of elements contained in the receiver that are equal to the element specified in the argument replaceFrom to with e g set newCltn eight nine parseAt f 1 2 newCltn cltnl replaceFrom to with gt eight nine three f 1 2 st strl replaceFrom to with gt stc returns the receiver with the elements from the start index first argument to the end index second argument replaced with the elements in the specified collection third argument The number of elements being replaced must be the same as the number of elements in the third argument This is very similar to copyReplaceFrom to with except that this Operation returns the modified receiver and the copyReplaceFrom to with operation returns a new collection and leaves the receiver unmodified replaceFrom to with startingAt e g set newClin eight nine ten parseAt f 1 2 newCltn 2 clini replaceFrom to with startingAt nine ten three
518. tion about when and where the mail is to be sent while the text between the mail and the mail statements becomes the text or body of the mail message Note that the text provided may contain WebBase variables macros and database field references so one can dynamically construct the body of the mail message just as one can dynamically construct Web pages with WebBase The mail macro contains a number of required and optional keywords used to direct the sending of the mail message Each keyword is followed by a single value either a string constant with the exception of the send keyword as described below a WebBase variable or a WebBase expression e to This keyword is required and is the address or addresses of where the mail message is to be sent It will appear in the header of the message as To on The format for this value and the from cc and bee fields below with exceptions as noted is a string such as you yourCompany com As noted above this value may be specified explicitly as a string or as the value of a variable or the result of evaluating an expression Multiple addresses can be specified by separating each with a comma e from This keyword is also required It is the address of the sender of the message the location to which a reply would be sent if appropriate Unlike the to cc and bec values this field will accept only a single address value This value will appear in the header of the messag
519. tion has to be created After the query is complete the connection goes away You can turn caching off by creating a global variable cacheODBC and setting its value to false If you have multiple databases this will turn caching off for all of them It is possible to control when an ODBC connection is generated using the cache keyword on the sql macro A value of false will cause the connection for that particular sql query to not be cached If the keyword is not specified the connection is cached All of the current ODBC connections can be cleared either using the Clear ODBC Cache option on the WebBase WebServer window or by creating a form containing the following line WebBase User s Guide 257 Chapter 12 Features f Scmd clearOdbcCache Additional information about the ODBC connection cache in included in the section on Database Administration in Chapter 14 12 3 WHERE Clause amp Variable Name Suffixes 258 The 7WHERE variable was designed to automatically create an SQL WHERE clause from the variables found in the GET or POST command string A simple example GET test htf ID 1234 amp name George yields SWHERES WHERE ID 1234 AND name George The ID and name fields in the command line would typically come from lt INPUT NAME ID VALUE gt elements in a form One could also specify this information in an anchor as lt A HREF test htf ID vall amp name val2 gt
520. tions that can be applied to the character s extracted from string variables and or character constants There are no class operations available for characters e e g f A 8Z gt 25 f 25 Z gt 65 If the argument is a character returns the difference between the receiver s asciiValue and the argument s ascii Value if it is an integer returns the difference between the receiver s ascii Value and the argument e comma e g f B A AB f be A Abc returns a string generated by concatenating the receiver with the argument which is either a character or a string e e g f 25 A gt Z returns a character whose asciiValue is the sum of the receiver s asciiValue and the argument or its ascii Value e lt e g f e f gt false returns true if the receiver is less than the argument using a sort order character comparison otherwise false e lt e g f e f gt false returns true if the receiver is less than or equal to the argument using a sort order character comparison otherwise false e e g f e 2 Hello at gt true returns true if the receiver and the argument are the same character otherwise false e gt eg f e f gt true returns true if the receiver is greater than the argument using a sort order character comparison otherwise false WebBase User s Guide e gt e g f e f gt true returns true if the receiver is greater
521. to a value of 3 The next expression sets oldCounter to the string counter which is also the name of a variable The last expression oldCounter says set the variable newCounter to the value of the variable whose name can be found in oldCounter If the indirection sign is placed in front of the variable that is being updated or created i e the first argument this means to treat this as an existing variable name whose contents is what we actually want here in the set macro For example set foo bar set foo 3 will set bar to 3 The value of the variable foo is bar but the value of the variable bar is 3 Multiple variable indirection is also possible as shown in the following two examples Example 8 35 set Macro and Multiple Variable Indirection set counter 3 set oldCounter counter set olderCounter oldCounter set newCounter olderCounter set counter 3 set oldCounter counter set olderCounter counter set newCounter olderCounter WebBase User s Guide 103 Chapter 8 Macros setCookie lt var gt lt val gt The setCookie macro operates exactly as does the set macro except that it will store its name value pair in a cookie dictionary A cookie dictionary is very similar to the user dictionaries described in Chapter 10 However there is only a single cookies dictionary used by WebBase The cookies dictionary gets written out as a header variabl
522. to addresses the full text of the mail etc and the entire reply from the server which usually is quite lengthy and includes server name status id numbers etc The display below shows the results of a full trace for a message The information returned by the mail server has been removed from the display it is normally displayed on the window The variable mailFullTrace can be used to automatically enable or disable this feature by default 1t is disabled Full Mail Trace of Single Message i WebBase 56 Mail Service 100 lines Of x File Edit Status 10 reply lt message back from mail server gt 10 send QUIT lt CrLf gt 10 reply lt message back from mail server gt 10 send MIME Version 1 0 Date Fri 11 Apr 1997 12 04 22 0100 From vendor CompanyB com To customer CompanyA COM Subject Order Confirmation Content Type text plain charset us ascii Content Transfer Encoding 7bit lt text portion of message gt lt CrLf gt 10 reply lt message back from mail server gt 10 send DATA lt CrLf gt 10 reply lt message back from mail server gt 10 send RCPT TO customer BdCompanyA com lt CrLf gt 10 reply lt message back from mail server gt 10 send MAIL FROM vendor CompanyB com lt CrLf gt 10 reply lt message back from mail server gt 10 send HELO lt CrLf gt 4 lt gt 10 reply lt message back from mail server gt 3 lt gt Mail Fri 11 Apr 1997 12 26 49 dt 04 11 97 12 04 22 fr vendor CompanyB to customer Compa
523. to see if any commands are in process If there are no commands being processed the status line is updated to indicate that the system is idle The date and time are also displayed and are updated each minute so the user can verify that WebBase is still responding The idle status message looks like 2 O Thr 13 Mar 1997 12 54 29 Idle Chapter 5 WebBase Windows WebBase Server Window Text Display The following sets of information are displayed on the WebBase Server window below the status line System Parameters The system parameters section starts with the WebBase copyright statement and identifies the WebBase version and build the user s license number when WebBase was started the type of system in use and other network related information WebBase Parameters This section is a list of all the WebBase startup parameters defined in the System Registry Many of these parameters are entered during installation If any of these parameters needs to be changed it is necessary to modify the value in the System Registry and then stop and restart WebBase All the WebBase parameters are defined in Chapter 4 Aliases This section is only included if the user has defined any aliases in the System Registry If so each alias and its translation are displayed in this section Alias information and how to define aliases is found in Chapter 4 If an alias needs to be changed or added it is necessary to modify the value in the System
524. to using However the value of LIKE is when the user is allowed to type in the character as part of the input thus positioning the wildcard somewhere in the input text rather than just at the beginning and or the end of the string Even if the wildcard character is to be at the beginning or the end the user who is entering the text has control over where the character is located and not the developer of the Web page 7LIKE e g name LIKE George name LIKE George adds the field to the WHERE clause with a LIKE operator and includes wild carding at both ends of the string LIKE e g name LIKE George gt name LIKE George adds the field to the WHERE clause with a LIKE operator and includes wild carding at the beginning of the string LIKE e g name LIKE George gt name LIKE George adds the field to the WHERE clause with a LIKE operator and includes wild carding at the end of the string LT e g ID LT 123 gt ID lt 123 adds the field to the WHERE clause using a less than operator LTN e g ID LTN 123 gt ID lt 123 same as LT but coerces the value to a number using asNumber WebBase User s Guide 259 Chapter 12 Features e LTS e g ID LTS 123 gt ID lt 123 same as LT but coerces the value to a string using asString and encloses the field in single quotes e NEQ e g ID NEQ 123 gt ID 123 adds the field to the WHERE clause using a not equal operator e NEQN e g I
525. tream is positioned at the beginning for any subsequent operations e asSymbol e g f myString asSymbol gt myString returns a symbol whose characters are the same as the receiver e asTime e g f 10 30 00 AM asTime 10 30 00 AM returns a time as specified in the receiver Note that the receiver must be in the time format in use by the operating system e g 12 hour or 24 hour e asUppercase e g f Hi There asUppercase gt HI THERE returns a new string in which all the characters of the argument have been converted to uppercase This can also be written using asUpperCase e asUseableHTML e g f amp lt amp gt asUseableHTML gt lt gt returns the receiver after replacing any occurrences of amp amp with 82 amp lt with lt and amp gt with gt e at e g f 2 Hello at gt e returns the character at the position specified within the string An error occurs if the index is out of range for the string size e at put e g f 1 H hello at put gt H returns the second argument after placing it within the receiver at the index specified in the first argument Note that the modified string is NOT returned but that 1f the string had been saved in a variable the value of the variable would reflect the change e authDecode e g f Basic bkxXIOYW1lOm1I5UGFzc3dvcmQ authDecode gt myName myPassword returns a new string representing the
526. truck The normal way in which WebBase would parse the command string would be to assign the value convertible to the variable named modtype then assign the value minivan to the variable named modtype overwriting the first value then on with truck and so forth The result would be a variable named modtype with a value of the last modtype xxx entry found in the command string The varList variable is used to inform WebBase that there are multiple entries in the command string with the same name and that all values associated with these entries are desired This variable is created using a hidden variable as in the following expression lt INPUT TYPE HIDDEN NAME SvarList VALUE modtype gt Placing this input field before the fields named modtype causes WebBase to set up a list for collecting the modtype values as they are encountered in the command string With this entry in the command string the modtype variable would return a list of the accumulated values as modtype OrderedList convertible minivan truck The size method can be sent to modtype e g case modtype size to determine the number of entries and the forRow oneValue on modtype oneValue forRow construct could be used to iterate over the collected entries If the input form were to contain more than one variable that is to be repeated in the command string one must specify all the variables that can ap
527. ude this cookie If the browser is not cookie enabled the server will receive no cookies cookieVariables e g Dictionary CookieCounter gt 17 WebBaselD gt W14259214E161808318465B returns a dictionary of all the cookie variables both incoming and outgoing The keys to the dictionary are the names of the variables the values are the values of the cookie variables Note that there is no indication within the dictionary of which cookie variables were received from the browser and which have been created via the setCookie macro for return to the browser Modifying this dictionary will have no effect on the cookie variables active in WebBase See also cookieVariablesHTML cookielInVariables YcookieOutVariables YocookieIn VariablesHTML and cookieOutVariablesHTML cookieVariableeHTML e g see below formats all the incoming and outgoing cookie variables and their values for a nice printout on the browser as shown in the example below See also cookieVariables cookielnVariables YocookieOutVariables YocookieInVariablesHTML and cookieOutVariablesHTML Example 9 9 cookieVariablesHTML display Input Cookie Variables e CookieCounter 17 e WebBaseID W14259214E161808318465B Output Cookie Variables NONE copyright e g Copyright 1995 7 ExperTelligence Inc the system copyright string date e g 03 10 97 the current date It is accessed from the operating system
528. udes 1 object code computer software and 2 related end user documentation All right title and interest in and to the Program is retained by ExperTelligence Inc Company and is disclosed to you only for use in accordance with the terms of this agreement 1 You are granted a personal nonassignable nonexclusive fully revocable license to install the Program in a single server The Program is a commercially valuable proprietary product of Company the design and development of which reflect the efforts of development experts and the investment of considerable time and money The Program is based on substantial trade secrets of Company and Company claims and reserves all rights and benefits afforded under federal copyright law and international copyright treaties in the Program as published work You are required to devote your best efforts to prevent any use or disclosure of the Program or of any trade secret embodied or reflected in the Program You agree that no copies shall be made of the Program or any portion thereof and that you shall not reverse engineer or decompile the object code of the Program into source code It is understood that the foregoing shall not apply to information that 1 is in the public domain through no fault of your own at the time of its disclosure to you 2 is independently developed by you or others without reliance on the information media and materials provided to you hereunder or 3 subsequent t
529. ue operation if necessary The table below shows the optional keyword value pairs that can be used with the timer macro date Date String The date on which the entry is to be executed Ifa string it is in a format that can be used to generate a Date instance time Time String The time of day on which the entry is to be executed If a string it is in a format that can be used to generate a Time instance period Integer The number of minutes between execution of the entry The first time the form will be run will be lt Integer gt minutes from the time the entry is placed onto the timer queue it will not be run immediately title String The function of the entry added to the timer queue This can be displayed using the timerQueueSQL operation available on cmd see Chapter 11 110 WebBase User s Guide The number of times the entry should be run before it is removed from the queue If date is specified this value is automatically set to 1 It can be used to allow periodic entries to run every lt Integer gt minutes for a count number of times then be removed The above date time and period entries are interpreted as follows to control the scheduling of the timer entry If a date argument is supplied the entry will be executed only once on the date indicated or today if the date has already passed based on the values of any additional arguments If a time argument is indicated along with a date the entry will be ex
530. ue which is the default WebBase will check to see if the form on disk has been modified subsequent to the version that was added to the cache If so the form on disk is opened read and the new contents are placed into the cache This should be set to true in a highly interactive development environment In a pure production environment this should be turned off as checking the time stamp involves open file overhead although less than allocating buffers and actually reading and reparsing the file as when caching is off all together Creating a form containing the following line can clear all of the forms in the cache f Scmd clearFormsCache ODBC Connection Caching The first time a user makes a request of a database a new ODBC connection is made for that source name and username When the request is finished the connection is put into the cache and marked that it is idle If multiple users are accessing the same database at the same time then multiple connections will be made and cached since each connection can only handle a single request at a time If you were to look at the O0DBCcacheHTML variable you might find several entries in the cache for the same source and username These are there because multiple users have been making requests at the same time It is recommended that ODBC connection caching be enabled to improve performance If ODBC caching is disabled each database query will take longer to be made since a new connec
531. ue is used in the computation of serverAverage and serverThroughput serverHostName e g http www expertelligence com the name of the server system If the local header variable Host is defined the value is used If not the domain HostName parameter is used If this parameter is not defined then the server IP address is used Any of these values are concatenated with http to generate the full server host name serverStartTime e g Monday 10 Mar 1997 14 12 40 GMT the date and time when the WebBase server was started serverThroughput e g 8 47839699 the average number of commands that are being processed by the WebBase server This is simply the number of commands WebBase has processed divided by the amount of time WebBase has been running since last launched It does not take into account any idle time and therefore is not a measure of the performance of the server See also Z serverThroughputH TML serverThroughputHTML e g see below formats the current statistic on the average number of commands processed by the WebBase server for a nice printout on the browser as shown below This is simply the WebBase User s Guide number of commands WebBase has processed divided by the amount of time WebBase has been running since last launched It does not take into account any idle time and therefore is not a measure of the performance of the server See also ZeserverThroughput Example 9 32 serverThrou
532. uide WEB 5 Inttialization ExperTolligence Chapter 4 WebBase uses a number of initialization parameters that are described in this chapter and were previously referred to in the chapter on WebBase installation In addition to these initialization parameters WebBase also allows the user to define file extensions and their handling directory aliases and multiple domain support All this information is stored in the System Registry on a Windows NT or Windows 95 system On a Windows 3 1 or Windows for Workgroups system INI files are used Although the format is different between the System Registry and the INI files the required entries are the same This chapter presents details on how to modify the System Registry using the WebBase WebWizard Registration Database utility Appendix B covers how to set up INI files as well as how to directly modify entries in the System Registry 4 1 Parameters During the installation of WebBase the default set of WebBase parameters is displayed and you are given the option of modifying the parameters All WebBase parameters described in this section are extracted from the System Registry when WebBase is launched Changing the entry for any parameter will have no effect on a running WebBase application To effect a change for any entry you must stop and restart WebBase after editing the parameter The name of each parameter is case sensitive and must be entered exactly as shown below If a
533. ult the most recent sql macro data is made available for accessing by field names If one were to use more than one sq macro in a form the with macro allows one to indicate which of the result sets are to be used when a field name is specified outside a forRow construct The with macro can be nested as shown in the example below The result set in effect will be the one in the innermost nesting at the time See the section on Field Variables in Chapter 9 for details on how the with and forRow macros access field variables within a result set The argument to the with macro is either a variable name as in the example below or an expression that must evaluate to either a collection of records returned from a sql SELECT or a single OdbcRowObject instance If the argument is a collection or records only the first will be handled within the with macro Generally a single item from a collection will be the argument to the with macro If one wished to address the last row of data returned by the first sql macro in the example below one could write with setl last or the third row of data returned in set2 would be with 3 set2 at WebBase User s Guide Example 8 48 with Macro sql to setl SELECT NAME ADDRESS sql sql to set2 SELECT MODEL sql with setl NAME with set2 MODEL with ADDRESS with writeFile lt file gt lt optionalArgs gt wri
534. ultiple domain names are set up outside of WebBase This HostName parameter is only used so that if the user wants to do a redirect to a particular domain that the name of the domain can be used in the URL instead of the IP address e HostAddress optional a string containing a dotted IP address to which the heartbeat command is to be sent the heartbeat function is described in chapter 5 If not present WebBase uses 127 0 0 1 which should correspond in most systems to the local host e StartupForm optional a htf form that WebBase will automatically run each time the server is started and before 1t begins processing any browser commands WebBase runs the Startup Form as if it had been CALLed by the call macro The only difference is that the Startup Form is CALLed by the WebBase Server itself and NOT by another htf form This CALLed Startup Form is CALLed as 1f wait true were indicated the server waits for the form to complete before going on to process other forms and it accepts any number of returned parameters passed back from either a return or exit macro in the CALLed Startup Form Since there is no browser involved in the running of this Startup Form the output returned from this form is displayed in the WebBase WebServer window An example of such output is Running StartupForm Startup htf 01 OK StartupForm Startup htf complete In the above the Startup Form is identified and the 01 OK was the fir
535. um of the x coordinates and the minimum of the y coordinates of the receiver and the argument negated e g f pointl negated gt 3 5 returns a new point with the x and y coordinates of the receiver negated rounded e g f point rounded gt 3 5 returns a new point which has the receiver coordinates rounded to integers transpose e g f point transpose gt 5 3 returns a new point with x coordinate equal to the receiver s y coordinate and y coordinate equal to the receiver s x coordinate truncated e g f point truncated gt 3 5 returns a new point which has the receiver coordinates truncated to integers x e g f pointl x gt 3 returns the receiver s x coordinate x e g f 4 point x pointl 4 5 returns the receiver after changing its x coordinate to the argument y e g f pointl y gt 5 returns the receiver s y coordinate y e g f 6 pointl y pointl gt 3 6 returns the receiver after changing its y coordinate to the argument Point Class Operations This section covers all the operations that can be performed on the Point class which is accessed using the global variable Point xy e g f 35 Point x y gt 3 5 returns a new point whose x coordinate is the first argument and whose y coordinate is the second argument WebBase User s Guide 11 8 General Collection Operations Many of the objects used within WebBase are a type of collection including Arrays O
536. umber of records to be returned in a query by the sql macro This can be created as a global user or local variable or overridden explicitly in the sq macro using the max keyword argument This defaults to 0 which means that all records will be returned by the query mimeType this variable identifies what will be stored in the Content type header entity that is returned to the browser For standard htf files this defaults to text html Each file extension has an associated mime type as described in Chapter 4 Since a htf file is already being processed and will ship something back to the browser for display the only other type of ZmimeType that one might want to set is text plain This means the browser ignores all the HTML tags and just displays the text including all the lt H2 gt controls etc password the name of the password to be used by the sql macro This can be created as a global WebBase User s Guide user or local variable or overridden explicitly in the sq macro using the password keyword argument This defaults to an empty string e skipAutoCookies This is less drastic than turning off cookie support completely by setting skipCookies to true If set to true WebBase will not send any of the default WebBase cookies to the browser Any cookies created by the user using the setCookie macro will be sent to the browser If skipCookies is set to true the value of this variable is ignored
537. undayInMonth e g f date lastSundayInMonth 89 returns the number of days after the start of the year for the last Sunday in the current month max e g set datel 2 10 97 asDate f datel Yodate max 03 18 97 returns the maximum more recent of the receiver or the argument min e g set datel 2 10 97 asDate f datel date min gt 03 18 97 returns the minimum less recent of the receiver or the argument WebBase User s Guide e monthIndex e g f date monthIndex gt 3 returns the number of the month e monthName e g f date monthName gt March returns the symbol identifying the name of the month e previousWeekday e g f Tuesday date previousWeekday gt 03 11 95 returns a Date reflecting the most recent day name represented by the argument preceding the receiver The argument must be a symbol valid entries are Sunday Monday Tuesday Wednesday Thursday Friday and Saturday The denotes that the argument is a symbol e printInFormat twoDigitYear e g f 2 false date printInFormat twoDigitYear 1997 03 18 returns a string representing the receiver in the form specified by the first argument The first argument is an integer as noted below 0 Month Day Year 1 Day Month Year 2 Year Month Day The second argument is a Boolean that specifies whether the year should be printed in 2 digits or 4 See also printOn inFormat twoDigitYear e p
538. unique characteristics ODBC Driver Database Engine Errors It is possible to send requests to an ODBC driver and or database engine that will result in an error occurring within that driver or engine not actually within the WebBase application code itself This error will be reported back as an ODBC driver database error with the corresponding sql macro provided as part of the error text This is done to help indicate specifically which macro call was involved should there be more than one in the pertinent form Some situations are handled gracefully within the ODBC driver and or database engine and result in an error message being returned to WebBase that WebBase then presents to the user Other error conditions result in an Operating System error which although returned to WebBase does not necessarily leave the ODBC driver and or the database engine in a state to allow the server to continue Some such errors are Protection Violation and GPF general protection fault errors If one were to examine the error log file created in the directory containing the WebBase exe application one would see a traceback indicating an ODBCDLL API call was made just prior to the error It is impossible for WebBase itself to prevent errors such as the Protection Violation or GPF errors noted above However WebBase will not terminate with such errors Rather it will trap these errors and report them to the user in a graceful
539. unt 6809923 APILevel 1 ConnectFunctions YYN DriverODBCVer 02 50 FileUsage 1 FileExtns db SQLLevel 0 ConectFunctions YYN e Microsoft Text Driver txt csv SQLLevel 0 FileExtns asc csv tab txt FileUsage 1 DriverODBCVer 02 50 ConectFunctions YYN APILevel 1 e Microsoft Text Driver txt csv UsageCount 6809923 APILevel 1 ConnectFunctions YYN DriverODBCVer 02 50 FileUsage 1 FileExtns asc csv tab txt csv SOLLevel 0 e SQL Server UsageCount 6809923 SQLLevel 1 FileUsage 0 DriverODBCVer 02 50 ConnectFunctions YYY APILevel 2 e Visigenic 32 bit Oracle Driver UsageCount 6809923 SQLLevel 1 FileUsage 0 DriverODBCVer 02 50 ConnectFunctions YYY APILevel 1 e ODBCsources e g SortedCollection dBASE Files gt Microsoft dBase Driver dbf excell gt Microsoft Excel Driver xls FoxPro Files gt Microsoft FoxPro Driver dbf myAccess gt Microsoft Access Driver mdb Paradox Files gt Microsoft Paradox Driver db Text Files gt Microsoft Text Driver txt csv a collection of the ODBC sources which have been defined Each entry in the collection is an association The key to each association is the source name and the value is the driver used e g MS Access SQL Server Note that some sources have database files associated with them e g myAccess while other sources are gener
540. ure past the Directory For example if the Directory parameter is set to c http it is not possible to access a file in c or c otherDir Aliasing can be used to access files in other directories or devices on the server system e http ww mySite com default htm The URL file string is the complete URL Note If any cookie variables are set using the setCookie macro in the form prior to the redirect macro being invoked these cookies are returned to the browser but the browser ignores them The cookies will not subsequently be returned to the server by the browser Example 8 24 reDirect Macro reDirect http www Mysite com reDirect2 lt arg gt reDirect2 The format of the reDirect2 macro is identical to that of the reDirect macro but allows arguments to be appended to the command line by specifying them as argl value arg2 value The arguments are specified one per line between the reDirect2 and reDirect2 macros just as in the call macro While it is possible to do this using the reDirect macro it is rather difficult The following shows how the same result would be done using both the reDirect2 and reDirect macros Example 8 25 reDirect2 Macro reDirect2 abc htf name John Q Public id 12 34 reDirect2 reDirect abc htf name John Q Public amp id 12 3E34 remove lt varNames gt The remove macro removes the variable with the specified varName from the to
541. urns a new date that is n number of days after the specified date where n is the input argument asSeconds e g f Yodate asSeconds gt 3036096000 returns the number of seconds elapsed from January 1 1901 until the specified date between and e g set datel 12 10 97 asDate set date2 2 10 97 asDate f date2 datel date between and true returns true if the receiver is between the two dates specified as arguments day e g f date day gt 35140 returns the number of days elapsed from January 1 1901 until the specified date dayIndex e g f date dayIndex gt 2 returns the index for the day of the week 1 Mon 7 Sun dayName e g f date dayName gt Tuesday returns the symbol identifying the day of the week dayOfMonth e g f date dayOfMonth gt 18 returns an integer from 1 to 31 specifying the day number within the month dayOfYear e g f date dayOfYear gt 77 returns an integer from 1 to 365 identifying the day number within the year WebBase User s Guide 209 Chapter 11 Expressions 210 daysInMonth e g f date daysInMonth gt 31 returns an integer identifying the number of days in the month daysInYear e g f date daysInYear gt 365 returns an integer identifying the number of days in the year daysLeftInMonth e g f date daysLeftInMonth 12 returns an integer specifying how many days remain in the month daysLeftInYear e g f date da
542. ut stream even if it is just at the end of a WebBase statement If the expression set output false is placed around WebBase processing that does not generate anything to be displayed at the browser less information will be returned to the browser e priority e g 3 a number 4 high 3 medium 2 low O yield that is the priority of the current command The statement set priority 4 does not actually set the variable but changes the priority of the command 0 does not change the priority number but forces the command to yield the CPU to give another process access to 1t e 9 random e g a Random an instance of a random number generator object Random numbers are in the range between 0 0 and 1 0 There are only two operations that can be used with random next and integerBelow The operation next returns the next random number as shown in the following example Example 9 28 random next usage Generate a random number and save it in the variable rand set rand Srandom next If you want to choose among a set number of items randomly you can use the integerBelow operation As shown in the example below the returned value will be in the range 0 to the integer below the give argument inclusively WebBase User s Guide 141 Chapter 9 Variables 142 Example 9 29 random integerBelow usage Pick a random entry from a list of returned answers set limit answers size Add 1 sin
543. ved and a new file will be created pathName e g f dirl pathName gt Nittp wbwizard returns a string representing the path name of the receiver drive letter not included remove e g set dir2 cWmyNewDin Directory pathName f dir2 remove gt a Directory on CAmyNewDiN returns the receiver after removing the directory represented by it from the disk subdirectories e g set dir2 c webbase Directory pathName f dir2 subdirectories gt SortedCollection webbase docs docs webbase logs logs webbase odbtalk odbtalk webbase support support returns an ordered collection of arrays where each array contains the complete pathname and the file name of a subdirectory of the receiver valid e g f dirl valid gt true returns true if the receiver is valid otherwise false validDrive e g f dirl validDrive gt true returns true if the receiver s drive is valid otherwise false validFile e g f xxx dat dirl validFile false returns true if the file name in the argument is a file or subdirectory in the receiver volumeLabel e g f dirl volumeLabel gt WILLIE returns the volume label of the disk containing the receiver Directory Class Operations The value of the Directory variable is the Directory class The operations that can be performed on this class are described below create e g f c nyNewDir Directory create gt Directory creates a di
544. ven value is numeric and not a string of numbers or that the string value of a variable is all in uppercase alpha characters This can be done using statements like set XXX xxx asNumber set xxx xxx asUppercase The WHERE variable generates and returns a string each time it is called This means that if one were to use the WHERE variable more than once in the same form one could change the contents of a variable used within the 7 WHERE after one access and receive a different string with the subsequent access If you want to use the same WHERE string more than once in a single form store the variable in a local variable with a statement like this oe set where SWHERE This not only ensures that the value does not change but also reduces the overhead in not having to reconstruct the same WHERE string each time More details on the use of the 7 WHERE variable can be found in Chapter 12 WebBase User s Guide e 9 whereAndOr e g AND specifies whether the command line argument value pairs used in the 7 WHERE variable will be put together with the AND or OR operator By default whereAndOr returns the string AND If you want to replace the AND operators with OR operators the following will create a local variable to override this dynamic variable to return the OR string set SwhereAndOr OR e whereMultiAndOr e g OR specifies whether multiple valued components used in the
545. vent the loss of WebBase parameters global variables extensions aliases and or multiple domain information if the user selects to remove WebBase as a service Also during installation WebBase is assigned the service name of httpSQL and is automatically created as a service that must be started manually If you want to have WebBase start each time your NT system starts up you must modify the httpSQL service via the Services Control Panel that starts when your NT system starts up By default the LocalSystem account is used which does not require a username password In addition the option to Allow Service to Interact with Desktop is also selected This option will cause WebBase to start and also the WebBase Late Breaking News and WebBase Server windows will be opened If this option is disabled the windows will not be opened when WebBase is started WebBase as a Service and ODBC Configuration When WebBase is installed as a service the ODBC data sources must be specified as System DSNs Start up the ODBC Administrator Select the System DSN option Verify that all databases to be accessed using WebBase have been set up as System DSNs and not User DSNs Starting the Service By default WebBase is configured to automatically start when the Windows NT system is started If it has been stopped or if it has been modified to start manually WebBase can be started as a service using the file WebSvStart bat Simply execute this
546. ver e log e g f 2 17 log gt 4 08746284 returns the log of the argument in the base specified by the receiver e max e g f 22 25 max gt 25 returns the maximum of the receiver or the argument e min e g f 22 25 min gt 22 returns the minimum of the receiver or the argument e negated e g f 12 7 negated gt 12 7 returns the negative value of the receiver e negative e g f 11 negative gt false returns true if the receiver is a negative number otherwise false e numerator e g f 17 3 numerator gt 17 3 f 3 10 numerator gt 3 returns the numerator of the receiver For most numbers this is the value of the receiver For fractions it will be the numerator within the fraction e odd e g f 11 odd gt true returns true if the receiver is an odd number otherwise false e positive e g f 11 positive gt true returns true if the receiver is a positive number otherwise false e printDollars e g f 29 95 printDollars 29 95 returns a string representing the receiver as a dollar value If the receiver contains more than 2 decimal places it is rounded WebBase User s Guide 173 Chapter 11 Expressions 174 printFraction e g f 3 0 52399327 printFraction gt 0 524 returns a string representing the receiver in which it has been truncated and rounded to the number of decimal places specified by the argument printFraction decimalSeparator e g f 3 0 52399
547. ver is not an empty string otherwise returns a non breaking HTML space e asNumber e g f 13 6 asNumber gt 13 6 f not a number asNumber gt 0 0 returns a number if the string is the representation of a number otherwise returns 0 0 e asOptions e g f banana apple banana cherry asOptions gt lt OPTION gt apple lt OPTION SELECTED gt banana lt OPTION gt cherry lt SELECT gt the receiver is a string of options as would be found on an HTML list box Each option is separated from the other by a semi colon The input argument is the option which is currently selected A string is returned that is properly formatted for HTML to identify all the options and which particular option is currently selected e asPrintableHTML e g f and asPrintableHTML gt amp amp and returns the receiver with any occurrences of amp gt or lt replaced with amp amp amp gt and amp lt respectively e asSqlString e g f O Brien asSqlString gt O Brien returns a new string in which all single quote marks within the string have been doubled This is required syntax for sql statements where the value is enclosed within single quotes and the value might contain a single quote character e asStream e g f my data for a stream asStream gt a Read WriteStream returns a stream read write containing the receiver The contents of the stream are the receiver and the s
548. very time a request is made and then the script will launch a database query program Only ASCII text is returned not a list of rows Another script must be used to massage the results into HTML Use WebBase intranet applications WebBase can be used within your company s network Online reference and documentation WebBase has its own home page where you can get the latest documentation and newest releases WebBase is a 32 bit application 32 bit is the only way to go Desktop development You can develop your WebBase applications off line work on your laptop at home or anywhere Cache ODBC connections You can directly control caching to provide very fast database accesses Online support forum Benefit from the experience of existing WebBase users Access multiple databases at the same time Most real business applications use multiple anywhere on the net databases WebBase is a multi threaded application WebBase can handle multiple hits at the same time 1 2 WebBase vs CGI As noted above no CGI scripts are required in WebBase Here are some more comparisons between CGI PERL and WebBase CGUPERL Must launch new process every hit No processes need to get launched Database connections need to be established Database connections are cached by EVERY hit WebBase State not retained shopping basket apps State is retained implicitly by WebBase are difficult shopping basket built in Scripts
549. vides the same functionality as described for the WebBase Transactions Service Window Edit gt Copy this menu option provides the same functionality as described for the Late Breaking News Window Edit gt Clear All this menu option provides the same functionality as described for the WebBase Transactions Service Window Edit gt Find this menu option provides the same functionality as described for the Late Breaking News Window Edit gt Find Again this menu option provides the same functionality as described for the Late Breaking News Window Edit gt Reload If this option is selected the request is sent to the specified location This 1s equivalent to pressing the Reload button in the WebBase Total View Window WebBase Total View Options The WebBase Total View Window presents several input fields and buttons at the top that allow the user to enter the type of command to be generated and the location it is to be sent to Reload If this button is pressed the information entered by the user on the input fields accept location and the type of command are formed into a message and sent to the specified location The address message sent and the results of the command are displayed in the text window GET POST HEAD These radio buttons identify the type of message that will be sent to the location When a button is selected the selection is displayed in the white area to the right of the buttons Accept T
550. w is opened This window is described later in this chapter While the WebBase Transactions Service window is open a checkmark appears next to this option If the option is selected while there is a check mark next to it the WebBase Transactions Service window is brought to the front Load Global Variables If this option is selected the confirmation dialog shown in Fig 5 11 is displayed If the user confirms that the global variable values should be updated they are read in from the System Registry The new values of all the global variables are displayed on the text area of the WebBase Server window This option is only used when a change has been made to a global variable See Chapter 9 for more information on global variables Each time WebBase starts it automatically reads in all the parameters global variables and other information set up in the System Registry It is important to remember that only global variables can be reloaded after WebBase has been started WebBase parameters aliases extensions and multiple domain changes require that WebBase be stopped and restarted Figure 5 11 Load Global Variables Confirmation Dialog Please Confirm Q This will overwrite the existing Global Variable definitions Load the Global Variables now Enable Cache Read This is a toggle on off option If forms caching is enabled default a check mark is displayed next to the menu option If forms caching is disabled no check mark is
551. xactly those elements in the argument otherwise false WebBase User s Guide e includes e g f version dictl includes true returns true 1f the receiver contains an association whose value is the same as the argument otherwise false e includesKey e g f Version dictl includesKey true f version dictl includesKey false returns true if the receiver contains an association whose key is the same as the argument otherwise false Note that the key must match exactly e isEmpty e g f dictl isEmpty gt false f Dictionary new isEmpty gt true returns true if the receiver does not contain any associations otherwise false e keyAtValue e g f 4 10 dictl keyAtValue gt Version returns the key for the association whose value equals the argument If not found returns nil e notEmpty e g f dictl notEmpty gt true f Dictionary new notEmpty gt false returns true if the receiver does contains any associations otherwise false Equivalent to isEmpty not e occurrencesOf e g f 4 10 dictl occurrencesOf gt 1 returns the number of associations in the receiver whose value is the same as the argument e removeAll e g f dict removeAll gt Dictionary returns the receiver after all of the associations within it have been removed e removeAssociation e g f assocl dict removeAssociation gt Dictionary Build gt 56 returns the receiv
552. xe fif gif gtar gz Ke DUO y p p p p p l M Gg pp AS L p o wor U html text html lication x tar ic x conference x cooltalk lication x tcl ief image ief lication x tex jpe image jpeg lication x texinfo jpeg image jpeg text plain jpg image jpeg j image tiff Js application x javascript j image tiff latex application x latex text plain ls application x javascript audio x wav mocha application x javascript image x xbitmap mov video quicktime image x xpixmap mpe video mpeg image x xwindowdump mpeg video mpeg application x compress mpg video mpeg j application x zip compressed WebBase users can go with the defaults as shown above totally override them with their own or indicate they want to take the defaults but override individual entries change them delete them and add to them To specify how a file extension type is to be handled the user creates a key in the system registry identifying the file extension The value of the extension is the mime type The default mime type for returning an HTML form without WebBase processing would be text html Any file containing WebBase macros or variables must be set up to be processed by the WebBase server By default WebBase will process any file with an extension of htf htm or html To indicate a file extension that WebBase should processed the mime type is enclosed in characters For example htf files hav
553. xtended Common Log File Format is shown below Example 12 2 0 0 0 0 26 Mar 1997 0 0 0 0 26 Mar 1997 0 0 0 0 26 Mar 1997 27 0 0 1 26 Mar 1997 Mozilla 3 0 Win95 I 27 0 0 1 26 Mar 1997 HTTP 1 0 200 6135 Moz 27 0 0 1 26 Mar 1997 200 490 http 127 0 0 1 27 0 0 1 26 Mar 1997 wowizard basicex Wbexams http 127 0 0 1 wbwizard Zi DO Ole 26 Mar 1997 wowizard basicex WBexaml http 127 0 0 1 wbwizard 271 0 0 1 26 Mar 1997 wowizard basicex WBexams http 127 0 0 1 wbwizard Mozilla 3 0 Win95 1 ZII 3464 26 Mar 1997 wowizard basicex WBexam2 http 127 0 0 1 wbwizard ZOO 26 Mar 1997 wowizard basicex WBexams http 127 0 0 1 wbwizard Mozilla 3 0 Win95 1 0 0 0 0 26 Mar 1997 0 0 0 0 26 Mar 1997 0 0 0 0 26 Mar 1997 07 58 09 0800 07 58 10 0800 07 58 10 0800 07 58 20 0800 07 58 21 0800 illa 3 0 Win95 07 58 24 0800 wbwizard Wizard 07 58 25 0800 htf now 28704 HT Wizard htf now 28700 Extended Common Log File Format none Start_Log HTTP 1 0 none Pause_Server_ gt _paused HTTP 1 0 none Pause_Server_ gt _active HTTP 1 0 GET wbwizard HTTP 1 0 200 527 GET wbwizard Wizard htf now 28700 1 GET wbwizard BasicEx now 28700 HTTP 1 0 htf now 28700 Mozilla 3 0 Win95 I GET TP 1 0 200 7782 Mozilla 3 0 Win95 I 07 58 27 0
554. yed is tmages jbox3a gif Absolute path references can also be used including accessing the image files via another server For example you might want to have both IIS and WebBase running on your site WebBase could handle any forms needing database processing Any image files could be returned via IIS To handle this you would simply create your variable using something like set imagesDir http www yourSite com 8000 images e How do I replace a database when users are actively posting requests There is not a way to put WebBase into a non service state but you might consider simply protecting all your database accesses Chapter 14 presents details on how to do Database Administration e How can I find out the type of browser accessing WebBase The header variable User Agent is passed in from the browser and identifies the type and version of the browser in use For example a Netscape 3 0 browser on a Windows 95 system will return Mozilla 3 0 Win95 1 A MSIE 3 0 browser on the same system will return Mozilla 2 0 compatible MSIE 3 01 Windows 95 e Can you use stored procedures in WebBase WebBase provides you a means of issuing an SQL statement via ODBC to your database If the query language supports stored procedures and the ODBC driver supports stored procedures then WebBase will support stored procedures The text between the sql and sql macros is defined by the ODBC SQL you should be able to a
555. ysLeftInYear gt 288 returns an integer specifying how many days remain in the year elapsedDaysSince e g set datel 2 10 97 asDate f datel date elapsedDaysSince gt 36 returns an integer specifying the number of days between the receiver and the argument elapsedMonthsSince e g set datel 2 10 97 asDate f datel date elapsedMonthsSince 1 returns an integer specifying the number of months between the receiver and the argument elapsedSecondsSince e g set datel 2 10 97 asDate f datel Yodate elapsedSecondsSince gt 3110400 returns an integer specifying the number of seconds between the receiver and the argument firstDayInMonth e g f date firstDayInMonth gt 60 retums an integer specifying the number of the first day in the month from the beginning of the year firstDayOfMonth e g f date firstDayOfMonth gt 03 01 97 returns a new date representing the first of the month firstSundayIn e g f 3 date firstSundayIn gt 61 returns the number of days after the start of the year for the first Sunday within the month for the specified index firstSundayInMonth e g f date firstSundayInMonth gt 61 returns the number of days after the start of the year for the first Sunday in the current month lastSundayIn e g f 3 date lastSundayIn gt 89 returns the number of days after the start of the year for the last Sunday within the month for the specified index lastS

Download Pdf Manuals

image

Related Search

Here here we go again lyrics hereditary heretic heredity here movie here comes the sun heretic definition hereditary meaning hereinafter heresy definition here\u0027s johnny hereditary movie hereby here comes the guide hereditary angioedema hereditary hemochromatosis here comes the sun lyrics heretic movie hereditary spherocytosis hereditary hemorrhagic telangiectasia herencia here to slay heredia costa rica heretic game heretic streaming

Related Contents

取扱説明書  高圧蒸気滅菌装置 仕様書 大阪府立成人病センター  DIGIPOX 指套式脉搏血氧仪说明书  Lenovo ThinkPad T520    Comenzando  ALBERT ALBERT  AMD CS5536 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file