The UserID property specifies a user ID or name to use when making a connection.
object.UserID [= value]
| Part | Description |
|---|---|
| object | Expression that evaluates to an object in the Applies To list |
| value | User ID or name to use |
String
Read/write
HRESULT GetUserID(BSTR *pRetVal);
HRESULT SetUserID(BSTR NewValue);
You need to specify values for the UserID and Password properties if UseTrustedConnection is FALSE.
Note It is recommended that you connect to an instance of Microsoft® SQL Server™ using Windows Authentication instead of SQL Server Authentication. To use Windows Authentication, set UseTrustedConnection to TRUE.