User Guide
Programming i!-Database Plus
25
i!-Database Plus and DBWizard
NetlinxDBInclude.asp Functions (Cont.)
DB_LISTBOX_INIT()
Initializes an
sDB_LISTBOX structure.
The DB_LISTBOX_INIT should be called for all sDB_LISTBOX structures before
use.
Syntax:
DB_LISTBOX_INIT(_sDB_LISTBOX sTempListBox, INTEGER
DisplaySize, INTEGER nPanelIndex)
Variables:
sTempListBox = Represents the list box structure. (Required.)
DisplaySize = Represents the size of page for the list box. (Required.)
nPanelIndex = The index for the panel viewing data with this list box. (Required.)
Return Values:
DB_LISTBOX_INIT does not return a value.
DB_LISTBOX_SET()
Sets the starting index of
an sDB_LISTBOX
structure.
The DB_LISTBOX_SET should return the same value as was passed in unless a
limit was reached. Since the maximum size of a list box using this structure is
32767 (maximum size of a SINTEGER in NetLinx), sending any value larger than
this will force the list box to the last page. Typically, $FFFF is the value used for
this. If the bFROM_SLIDER flag is set, then the value is assumed to be 0 - 255 and
will be scaled as a percentage of the total items in the list.
Syntax:
DB_LISTBOX_SET(_sDB_LISTBOX sTempListBox, INTEGER nIDX,
CHAR bFROM_SLIDER)
Variable:
sTempListBox = Represents the list box structure. (Required.)
nIDX = Represents the new starting index for the list box. (Required.)
bFROM_SLIDER = Set to 1 if value is a raw (0 - 255) value from a slider.
(Required.)
Return Values:
DB_LISTBOX_SET returns the starting position of the list box.
DB_LISTBOX_UP()
Sets the starting index of
an sDB_LISTBOX
structure to display the
previous page.
The DB_LISTBOX_UP moves the starting index to display the previous page. The
constant nDB_LISTBOX_PAGE_OVERLAP controls how the new index is
calculated. If the constant is set to 1 (default), the first item in the list will become
the last item in the list. If the constant is 0, the new page will not contain any items
from the previous page.
Syntax:
DB_LISTBOX_UP(_sDB_LISTBOX sTempListBox)
Variable:
sTempListBox = Represents the list box structure. (Required.)
Return Values:
DB_LISTBOX_UP returns the starting position of the list box.
DB_MAKE_URL_
STRING()
Converts a string to a URL
compatible string. All
characters illegal in URL's
are replaced with a "%"
hex code equivalent.
The DB_MAKE_URL_STRING function is used to convert SQL queries into CGI
strings. It uses DB_STRING_REPLACE.
Syntax:
DB_MAKE_URL_STRING(CHAR strSTR[])
Variable:
strSTR = Represents the string to be converted by the process. (Required.)
Return Values:
DB_MAKE_URL_STRING returns the string strSTR after the all invalid characters
have been replaced.
Continued