DBDropList

(ODBC Manager Library)

Description:              Populates a droplist using the results of an SQL query on a given database.

 Format:                    \ODBCManager\DBDropList(    X1,  Y1,  X2,  Y2,  DSN,  UserName,  Password,  SQLQuery,  Title,  LocFocusID,  Init,  Var[,  DrawBevel,  AlignTitle,  AddInvalid,  InvalidText])

Returns:                    Numeric

Usage:                       Script

Parameters:          X1      { numeric }  { required }  { no default: }

                             Screen coordinates of the left side of drop list

                             Y1      { numeric }  { required }  { no default: }

                             Screen coordinates of the top of list

                             X2      { numeric }  { required }  { no default: }

                             Screen coordinates of the right side of the list

                             Y2      { numeric }  { required }  { no default: }

                             Screen coordinates of the bottom of list

                             DSN   { text }  { required }  { no default: }

                             DSN of the database to query

                             UserName    { text }  { required }  { no default: }

                             The user name in the database for authentication.

                             Password     {  text }  { required }  { no default: }

                             The password in the database for authentication.

                             SQLQuery     { text }  { required }  { no default: }

                             An SQL query that returns either one or two columns. The first column is used for droplist display,  the second (if it exists) provides the matching value for each entry in the list.

                             Title   { text }  { required }  { no default: }

                             The title for the drop list

                             LocFocusID  { numeric }  { required }  { no default: }

                             Numeric  expression for the focus number of this graphic. If this value is 0, the droplist will display its current setting, but will not be able to be opened (i.e. its value cannot be changed) and will appear grayed out. The default value is 1.

                             Init    { text }  { required }  { no default: }

                             Any expression for the initial value displayed in the field

                             Var    { variable }  { required }  { no default: }

                             A variable whose value will be set by this droplist

                             DrawBevel   { Boolean }  { optional }  { no default: }

                             If true (non-0) a bevel is drawn around the droplist, if false (0) no bevel is drawn. The default value is false

                             AlignTitle      { Boolean }  { optional }  { no default: }

                             If true (non-0) the title is included in the calculation for vertical alignment, if false(0) it is added to the droplist after it (and its bevel if one exists) has been vertically aligned. The default is true

                             AddInvalid    { Boolean }  { required }  { no default: }

                             If true an entry with an invalid value will be added at the top of list.

                             InvalidText   { text }  { required }  { no default: }

                             Used with AddInvalid to provide the text to be displayed for the item at the top of the list.

Comments:               This module is a member of the ODBCManager Library, and must therefore be prefaced by \ODBCManager\, as shown in "Format" above.

See Also:

Droplist |