Connecting works, but Disconnecting and reconnecting fails on application role.
Posted on 2008-11-18
With the VB 2005 code below I can connect to one or more databases. However if I connect to a database then connect to a different database, I can't reconnect to the original database.
Con1.ConnectionString = ConnectionString
cmd1.Connection = Con1
cmd1.CommandText = "sp_setapprole"
cmd1.CommandType = CommandType.StoredProcedure
The connection string is like this.
Data source=IPAddress;Initial Catalog=DbName;Integrated Security=SSPI;Persist Security Info=FALSE;Network Library=DBMSSOCN