II.  Reference Section

 

A. Display Modes

There are two distinct display modes: Grid and Form.

Basic display modes:

Grid - This is the normal display mode in HTML "table" format.  The field names are displayed in the top header row and the field values are displayed in the rows below the header.  In the situation where there are a small number of fields, you can display more data without scrolling by using the multiple grid (grid+/grid-) mode.  In this format, the grid will be "wrapped" to additional columns.

Form - This format displays only one record at a time with the field names displayed in the left column, and the field contents displayed in the right column. This format can be used to display a large number of fields with a minimum amount of horizontal scrolling.  Additionally, a multiple column feature (Form+, Form-) allows columns to "wrap", minimizing the amount of vertical space required.  This wrapping is very useful when a large number of fields are to be displayed.

Combination display modes:

Dual , Dual-horiz  - When a table has a large number of fields (250 for example), it would be impractical to display all 250 fields horizontally.  Using the Form mode (with column wrapping) can allow you to view all of the fields simultaneously.  However, you are limited to viewing and navigating only one record at a time.  There is a more elegant method of display that solves this problem known as “Dual” (and “Dual-horiz”) mode.  In Dual mode, you would display a small number of key fields in Grid mode and display the rest of the row data one record at a time in Form mode.  You could then click on a row in the Grid to select your record, and then see all of the row detail on the Form.  The only difference between Dual and Dual-horiz is that Dual mode displays the Form below the Grid and Dual-horiz displays the Form to the right of the Grid.

Both  - In this display mode, the Grid would be displayed with record numbers in the first column.  Clicking on one of the record numbers toggles the display to Form mode and displays that record.  You can remain in this view mode and navigate through the records one at a time with the Next / Prev buttons, or can click on the Grid button to toggle back to Grid mode.  When screen space is at a premium, and many fields are to be displayed simultaneously, "Both" mode can provide the best of both worlds.  It allows the Grid mode for record navigation, and Form mode for detailed viewing of each field.

 

B. FieldName and FieldNumber

In ASP-db, FieldName  and FieldNumber  can be intermixed.  FieldName is the text name of a field, like “[First Name]”.  If the name has embedded space(s), it must be enclosed in brackets.  FieldNumber starts at “0” and corresponds to the default field sequence.  The following examples show a few possibilities:

                X.dbFilterFlds = "[Car Name], [Manufacturer], Year, Price, MPG"

                X.dbFilterFlds = "0, [Manufacturer], Year, 3, MPG"

                X.dbGridHideFlds = "0, 1, 2, 3,7"

Notes:

If a field name has been changed using the dbNameMap  property, you should use whatever the name of the field was, before it was redefined in dbNameMap.

For best results, avoid using field names with special characters in them.  For example, if you want a column name to contain a question mark (?), such as "PromoItem?", just call it PromoItem in your database and use the dbNameMap property to change the way it will appear on the display.  Example: xx.dbNameMap="PromoItem,PromoItem?".  Special characters, especially the question mark, are confusing to the system's ODBC SQL and UPDATE statements and unpredictable things may happen.

 

C. Sorting Field Columns (Ascending and Descending)

Unless otherwise specified, the field names in the header will be hot linked (except memo and OLE OBJ).  This particular hot link means that when clicked the first time, the column will be sorted in ascending  order.  When clicked the second time consecutively, the sort  order will be changed to descending .  Clicking another field will repeat the procedure starting at ascending order.

 

D. Properties

Properties are used to specify the database and display format.  The general form is:

                Mydb.Property = “string_value” or numeric_value or boolean value

Note: All property names and values are case insensitive.


E. Delimiter Definitions (User Defined Delimiters)

Delimiters are used to separate various values in the ASP-db property statements. Due to the fact that a property  can contain any characters, it is necessary to allow the user to customize them. For example -

dbproperty="a,b,c,d"

Here, comma is used to separate the a,b,c and d values. If one of them is a SQL statement like SELECT Field1, Field2 from TABLE, then comma cannot be used to delimite them any more. We have to do something like -

dbProperty="(;|)a| b| SELECT Field1, Field2 from TABLE | d

You may redefine or override the standard parameter delimiters used within the various ASP-db properties.  This is accomplished within the property statement itself by specifying the delimiters that you want to use right at the beginning.  Just put the delimiters inside parenthesis and then you may use those delimiters in the rest of the statement.  The general form is:

   X.dbProperty = “(abc)parm1,parm2,parm3 ; parm1,parm2,parm3 ; parm1, parm2, item1/item2/item3”

If (abc) is present, then a is the major delimiter, in this case a semi-colon, b is the minor delimiter, in this case a comma, and c is the micro delimiter, in this case a slash. For example, say parm1 was a company name like “Jones, Inc.”. You would need to be able to include a comma in the parameter meaning you wouldn’t be able to use a comma for a delimiter anymore.  You should do this instead:  X.dbProperty = “ ( ; | / ) Ford | Nike | Jones, Inc. ; Cars | Shoes | Hats ”  (Note: spaces are inserted in this documentation for readablity purposes and should not be used in your code.)  

The one property that needs the most attention is the dbMagicCell. The standard delimiters are (;,[]#|~/). If the values contains one of these characters, the the delimiter has to be changed like Format=[$###,###]. This property conflicts the "#" and "," delimiter. So if this format is used the delimiters should be changed to something like (;^[]%|~/).

dbFilterDropFlds:

The three delimiters used by this property are major separator (between the groups of four parameters), minor separator (between parameters), and micro separator (within the fourth parameter)

dbMagicCell:

The seven delimiters used by this property are major separator (between the groups of three parameters), minor separator (between parameters), left format delimiter, right format delimiter, field contents encloser, compare operator delimiter, and the delimiter separating multiple compares .  Examples:

   X.dbMagicCell = “ ( ; , [ ] ^ | ~) Cash, align=center, <font color = red> format = [currency] </font> ”

   X.dbMagicCell = “ ( ; , [ ] ^  | ~) Photo,,<IMG SRC = ^Photo^> ”

dbSelectBox:

The three delimiters used by this property are major separator (follows the first group of three parameters), minor separator (between parameters), and field contents encloser.  Example:

   X.dbSelectBox = “ ( ; , # ) 8,Pick a Product,Click to See Inventory; #ProductID# --> #ProductName# ”

dbQuickProps:

The two delimiters used by this property are major separator and minor separator.  This is especially useful if you need to include the UID and PASSWORD parameter on the DSN specificaion.  Example:

   X.dbQuickProps="( / , ) 1 / DSN=pubs; UID=sa; PWD=bananas / Table3 / Dual-horiz / 4,Auto,Lightgreen / gif / std"

dbOptions:

The three delimiters used by this property are major separator, minor separator, and a third (presently unused) delimiter.

   X.dbOptions   = "( | / * ) ConnTimeout=30 / CellFontTag=size=5"