■No93362 (たかし さん) に返信
> <connectionStrings>
> <add name="**********.My.MySettings.**********_SQLConnectionString"
> connectionString="Data Source=(local)\SQLEXPRESS;Initial Catalog=**********SQL;Integrated Security=True"
> providerName="System.Data.SqlClient" />
> </connectionStrings>
System.Configuration を参照設定して
Imports System.Data.Common
Imports System.Configuration
Const connectionName As String = "**********.My.MySettings.**********_SQLConnectionString"
Dim config As ConnectionStringSettings =
ConfigurationManager.ConnectionStrings(connectionName)
としておいて
Dim factory As DbProviderFactory = DbProviderFactories.GetFactory(config.ProviderName)
Dim con As DbConnection = factory.CreateConnection()
con.ConnectionString = config.ConnectionString
con.Open()
もしくは
Dim cn As New SqlClient.SqlConnection
cn.ConnectionString = config.ConnectionString
cn.Open()
でどうでしょうか。