TODO #7010
The connection string must be verified to fulfill the .NET data provider connection string requirements.
Description
In most cases, the conversion of ADO, RDO or DAO to ADO.NET will require a manual modification of the connection string.
Recommendations
ADO.NET uses different parameters to connect to the database. The easiest way to know the appropriate connection string in the .NET environment is to use the "Data Connections" tool, which can be found in the "Server Explorer" tab of the .NET IDE, to create a new connection to the database and get the complete connection string from there.
Sample VB6
'---Connection---
'Instantiate the connection
Set cnConexion = New Connection
'Configure the connection string
strConex = "DRIVER=SQL Server;Database=NorthwindSQL;APP=Microsoft Data Access Components;SERVER=.\SQLEXPRESS"
'Set the connection string of the Connection object
cnConexion.ConnectionString = strConex
'Open the connection
cnConexion.Open
Target VB.NET
'---Connection---
'Instantiate the connectionDim cnConexion AsNew SqlConnection'Configure the connection stringDim strConex AsString = "DRIVER=SQL Server;Database=NorthwindSQL;APP=Microsoft Data Access Components;SERVER=.\SQLEXPRESS"'Set the connection string of the Connection objectcnConexion.ConnectionString = strConex
'Open the connection'UPGRADE_TODO: (7010) The connection string must be verified to fullfill the .NET data provider conecction string requirements.cnConexion.Open()
Expected VB.NET
'---Connection---
'Instantiate the connectionDim cnConexion AsNew SqlConnection'Configure the connection stringDim strConex AsString = "Data Source=.\SQLEXPRESS;Initial Catalog=NorthwindSQL;Integrated Security=True"'Set the connection string of the Connection objectcnConexion.ConnectionString = strConex
'Open the connection'UPGRADE_TODO: (7010) The connection string must be verified to fullfill the .NET data provider conecction string requirements.cnConexion.Open()
Target C#
//---Connection---
//Instantiate the connectionSqlConnection cnConexion = newSqlConnection();//Configure the connection stringstring strConex = "DRIVER=SQL Server;Database=NorthwindSQL;APP=Microsoft Data Access Components;SERVER=.\\SQLEXPRESS";//Set the connection string of the Connection objectcnConexion.ConnectionString = strConex;
//Open the connection//UPGRADE_TODO: (7010) The connection string must be verified to fullfill the .NET data provider conecction string requirements.cnConexion.Open();
Expected C#
//---Connection---
//Instantiate the connectionSqlConnection cnConexion = newSqlConnection();//Configure the connection stringstring strConex = @"Data Source=.\SQLEXPRESS;Initial Catalog=NorthwindSQL;Integrated Security=True";//Set the connection string of the Connection objectcnConexion.ConnectionString = strConex;
//Open the connection//UPGRADE_TODO: (7010) The connection string must be verified to fullfill the .NET data provider conecction string requirements.cnConexion.Open();
Updated for VBUC v3.0
Last generated on 6/19/2009 9:46:40 AM