|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Library Reference > UserInterface > DBWFilterSelect5 |
Displays a selection box reading data from a database.
Same purpose as DBWFilterSelect4 but allowing a user to make no selection and click OK.
Function DBWFilterSelect5(Title, Dsn, SelectStatement, FieldToRead, FieldToFilterOn, FilterValue, byref Multiresult, position, autoselectfirstrow)
Title |
title for the dialog box. |
|---|---|
Dsn |
ODBC data source name. |
SelectStatement |
SQL SELECT statement for the data |
FieldToRead |
name of the field to be read |
FieldToFilterOn |
name of the field on which apply the filter when inputting characters in the edit box |
FilterValue |
initial value for the filter that appears in the text box |
Position |
it the position of the dialog; possible values are: |
autoselectfirstrow |
0: no row is selected and manual selection is required by the user. |
Multiresult |
It is an array of Field_to_Read values in the filtered records |
DBWFilterSelect1
DBWFilterSelect2
DBWFilterSelect3
DBWFilterSelect4
Sub main()
title="Select a project"
dsn="DBWORKS"
FieldtoRead="ID"
FieldToFilterOn="DESCRIPTION"
FilterValue=""
SelectStatement="SELECT * FROM DOCUMENT WHERE T='0' ORDER BY UNIQUE_ID DESC"
position=0
dim multiresult
res=DBWFilterSelect5(title,Dsn,SelectStatement,FieldtoRead,FieldToFilterOn, FilterValue, multiresult, position,1)
if res="" then
DBWMsgbox "user canceled"
else
DBWMsgbox ubound(multiresult)+1 & " result(s)"
for i=0 to ubound(multiresult)
DBWMsgbox multiresult(i)
next
end if
End sub