LogOn
This is used to logon the database connection and specify a user / password sequence for a database connection. Use of this feature is optional.
Note: the user does not always require this function as the server calls it automatically when a session starts.
Group: Database Related Extensions
Syntax:
[bValue =] db.LogOn ([vSource], [vUserId], [vUserPwd])
bValue (Boolean) Optional – A True/False notification that the command processed successfully
vSource (Variant) data source name (DSN) or the data source number
vUserId (Variant) Optional – The login name to be used to connect to the database system
vUserPwd (Variant) Optional – The login password to be used to connect to the database system
Example:
Dim bValue As Boolean
bValue = db.LogOn("SQLServer", "SQLUser", "SQLPass1")
bValue = db.LogOn(1, "SQLUser", "SQLPass1", "CLIENT=800|TYPE=3")
bValue = db.LogOn("Access", "AccessUser", "AccessPass1")