LISTING 1: Setting Up an Application Role Private mcnn As ADODB.Connection Private mrst As ADODB.Recordset Private Sub Form_Load() Dim strConn As String ' Create the connection. strConn = "Provider=sqloledb;" & _ "Data Source=(local);" & _ "Initial Catalog=Products;" & _ "OLE DB Services = -2;" & _ "Integrated Security=SSPI" ' Open the connection, and activate the application role. Set mcnn = New ADODB.Connection mcnn.Open strConn mcnn.Execute "sp_setapprole 'ProductApprole', 'password'" End Sub