0
Our scenario is using MSSQL database configured for High Availability and Listener was created to link the balance between instances. Some applications made in Asp.Net MVC projects we managed to make connection by changing the Web config and applying a user on IIS.
Example of the Web.config that works:
<add name="ContextEntities" connectionString="Data Source=tcp:AGListener,60236;Initial Catalog=ClienteDB;persist security info=True;integrated security=true;MultipleActiveResultSets=True;" providerName="System.Data.SqlClient"/>
How to make this connection in VB6 projects?
Example of what’s on VB6 today:
Set cnBD = New ADODB.Connection
cnBD.CommandTimeout = 0
With cnBD
.Provider = "SQLOLEDB"
.ConnectionString = "USER ID=USUARIO;password=P@SSW0RD; data source = ClienteServer;Initial catalog = ClienteDB"
.Open
End With
in
vb
can also use theintegrated security=true
, the credentials of the user running the application will be used invb
– Ricardo Pontual
It would be interesting, but would have to create the credentials of all users in the instance of sql server?
– Cristhian Francis Ribeiro
can be simpler than this if users are logged in to the Windows domain. You can add users to a group and give SQL permission to that group instead of each user individually
– Ricardo Pontual