The Prompt property specifies how to prompt the user when connecting to a data source.
object.Properties("Prompt") [= value]
object
Expression that evaluates to an object in the Applies To list.
value
Small integer that indicates how to prompt the user, as specified in Settings.
Constant | Description |
---|---|
DBPROMPT_PROMPT | Always prompt the user for initialization information. |
DBPROMPT_COMPLETE | Prompt the user only if more information is needed. |
DBPROMPT_COMPLETEREQUIRED | Prompt the user only if more information is needed. Do not allow the user to enter optional information. |
DBPROMPT_NOPROMPT | Do not prompt the user. |
adSmallInt
Read/write
DBPROP_INIT_PROMPT
Information obtained from the user during prompting is available following initialization from the Properties collection. To prompt for initialization information, the OLE DB provider typically displays a dialog box to the user.
Dynamic properties of a Connection object are lost when the connection is closed. Therefore, the Prompt property must be reset before re-opening the connection to use a value other than the default.
Note An application should not specify that the provider should prompt the user in scenarios in which the user will not be able to respond to the dialog box. For example, the user will not be able to respond if the application is running on a server system instead of on the user's client, or if the application is running on a system with no user logged on. In these cases, the application will wait indefinitely for a response and appear to lock up.