Data Access
The options in this section define how the data access components will be migrated.
1. ADODB
1.1. To ADO.NET using System.Data.Common and helper classes
This optional feature allows the VB6 AI Migrator to convert ADODB to ADO.NET by using the System.Data.Common libraries and some helpers.
General Description:
This solution uses a set of helper objects to provide equivalent behavior in .NET and to encapsulate the ADO.NET machinery required to handle a set of data, more specifically, for the RecordSet object, which is very powerful and flexible in Visual Basic 6 and does not have a direct equivalent in .NET. This approach reduces the manual changes effort to achieve functional equivalence.
The usage of System.Data.Common libraries provide the application with the ability to interact with different Database Manager Systems (e.g. SQL Server, Oracle, MS Access, etc) through its ADO.NET 2.0 compliant providers with just minimal configuration effort.
Deployment Note:
This feature uses a .NET configuration file containing specific sections. An example file is created in the output path of the migration solution. This file should be added to the main executable assembly and configured according to your needs by selecting the proper provider factory.
Class
Maps To
ADODB.RecordSet
UpgradeHelpers.DB.ADO.ADORecordSetHelper
ADODB.Command
System.Data.Common.DbCommand
ADODB.CommandTypeEnum
System.Data.CommandType
ADODB.Connection
System.Data.Common.DbConnection
ADODB.DataTypeEnum
System.Data.DbType
ADODB.Field
System.Data.DataColumn
ADODB.Fields
System.Data.DataColumnCollection
ADODB.IsolationLevelEnum
System.Data.IsolationLevel
ADODB.ObjectStateEnum
System.Data.ConnectionState
ADODB.Parameter
System.Data.Common.DbParameter
ADODB.ParameterDirectionEnum
System.Data.ParameterDirection
ADODB.Parameters
System.Data.Common.DbParameterCollection
ADODB.Stream
System.IO.StreamWriter
ADODB.LockTypeEnum
UpgradeHelpers.DB.ADO.LockTypeEnum
ADODB.CursorLocationEnum
UpgradeHelpers.DB.ADO.CursorLocationEnum
ADODB.AffectEnum
UpgradeHelpers.DB.ADO.AffectEnum
ADODB.EventStatusEnum
UpgradeHelpers.DB.ADO.Events.EventStatusEnum
ADODB.EventReasonEnum
UpgradeHelpers.DB.ADO.Events.EventReasonEnum
ADODB.PositionEnum
UpgradeHelpers.DB.ADO.PositionEnum
MSAdodcLib.Adodc
UpgradeHelpers.DB.ADO.ADODataControlHelper
MSAdodcLib.EOFActionEnum
UpgradeHelpers.DB.Controls.EOFActionEnum
MSAdodcLib.BOFActionEnum
UpgradeHelpers.DB.Controls.BOFActionEnum
This optional feature also includes the conversion of ADOR to ADO.NET.
Class
Maps To
ADOR.RecordSet
UpgradeHelpers.DB.ADO.ADORecordSetHelper
Original VB6 code:
C# code:
VB.NET code:
1.2. To ADO.NET using SqlClient
This optional feature allows the VB6 AI Migrator to Convert ADODB to plain ADO.NET by using the provider-specific System.Data.SqlClient libraries.
General Description:
This solution converts ADODB data access patterns to plain ADO.NET specifically to interact with a SQL Server database.
Class
Maps To
ADOBD.Command
System.Data.SqlClient.SqlCommand
ADOBD.Parameters
System.Data.SqlClient.SqlParameterCollection
ADOBD.DataTypeEnum
System.Data.DbType
ADOBD.ParameterDirectionEnum
System.Data.ParameterDirection
ADOBD.Parameter
System.Data.SqlClient.SqlParameter
ADOBD.RecordSet
System.Data.DataSet
ADOBD.CommandTypeEnum
System.Data.CommandType
ADOBD.Connection
System.Data.SqlClient.SqlConnection
ADOBD.Error
System.Data.SqlClient.SqlError
ADOBD.Errors
System.Data.SqlClient.SqlErrorCollection
ADOBD.IsolationLevelEnum
System.Data.IsolationLevel
ADOBD.ObjectStateEnum
System.Data.ConnectionState
This optional feature also includes the conversion of ADOR to ADO.NET.
Class
Maps To
ADOR.RecordSet
System.Data.DataSet
Original VB6 code:
C# code:
VB.NET code:
1.3. To COM Interop
This feature will take the legacy COM control and create an interoperability code wrapper to make it visible from the managed code. This means the control's functionality will remain the same since it will use the same binary, but the resulting application will depend on the legacy control.
Original VB6 code:
C# code:
VB.NET code:
2. DAO
2.1. To ADO.NET with helpers based on System.Data.Commons
This optional feature allows the VB6 AI Migrator to convert DAO to ADO.NET by using the System.Data.Common libraries and some helper classes.
General Description:
This solution uses a set of helper objects to provide equivalent behavior in .NET and to encapsulate the ADO.NET machinery required to handle a set of data, more specifically, for the RecordSet object, which is very powerful and flexible in Visual Basic 6 and does not have a direct equivalent in .NET. This approach reduces the manual changes effort to achieve functional equivalence.
The usage of System.Data.Common libraries provide the application with the ability to interact with different Database Manager Systems (e.g. SQL Server, Oracle, MS Access, etc) through its ADO.NET 2.0 compliant providers with just minimal configuration efforts.
Deployment Note:
This feature uses a .NET configuration file containing specific sections. An example file is created in the output path of the migration solution. This file should be added to the main executable assembly and configured according to your needs by selecting the proper provider factory.
Class
Maps to
DAO.Recordset
UpgradeHelpers.DB.DAO.DAORecordSetHelper
DAO.Field
System.Data.DataColumn
DAO.Fields
System.Data.DataColumnCollection
DAO.Database
System.Data.Common.DBConnection
DAO.ParameterDirectionEnum
System.Data.ParameterDirection
DAO.Parameters
System.Data.Common.DbParameterCollection
DAO.Parameter
System.Data.Common.DbParameter
DAO.QueryDef
System.Data.Common.DbCommand
DAO.Connection
System.Data.Common.DbConnection
DAO.Workspace
UpgradeHelpers.DB.DAO.WorkspaceHelper
DAO.DBEngine
UpgradeHelpers.DB.DAO.DBEngineHelper
DAO.RecordsetTypeEnum
UpgradeHelpers.DB.DAO.DAORecordsetTypeEnum
DAO.LockTypeEnum
UpgradeHelpers.DB.DAO.DAOLockTypeEnum
DAO.RecordsetOptionEnum
UpgradeHelpers.DB.DAO.DAORecordsetOptionEnum
Original VB6 code:
C# code:
VB.NET code:
2.2. To COM Interop
This optional feature will take the legacy COM control and create an interoperability code wrapper to make it visible from the managed code. This means the control’s functionality will remain the same since it will use the same binary, but the resulting application will depend on the legacy control.
Original VB6 code:
C# code:
VB.NET code:
3. MSAccessToNet
3.1. MSAccessToNet To ToolTip.NET
Conversion of Microsoft Access Object Library for Windows Forms using a helper class.
General Description:
Microsoft Access is a database management system (DBMS) from Microsoft that combines the relational Microsoft Jet Database Engine with a graphical user interface and software-development tools. It is a member of the Microsoft Office suite of applications, included in the Professional and higher editions or sold separately.
XML Configuration:
Deployment Note:
The VB6 AI Migrator converts the Microsoft Access MSACC.OLB to a helper class.
Class
Maps to
Access.Application
UpgradeHelpers.MSAccessToNet.MSAccessApplicationHelper
Access.DoCmd
UpgradeHelpers.MSAccessToNet.MSAccessApplicationHelper
Original VB6 code:
C# Code:
VB.NET code:
3.2. To COM Interop
This feature will take the legacy COM control and create an interoperability code wrapper to make it visible from the managed code. This means the control's functionality will remain the same since it will use the same binary, but the resulting application will depend on the legacy control.
Original VB6 code:
C# code:
VB.NET code:
4. OracleInProc
4.1. To System.DbConnection
Converts OracleInProcServer to ADO.NET by using the System.Data.Common libraries and some helpers.
General Description:
This solution uses a set of helper objects to provide equivalent behavior in .NET and to encapsulate the ADO.NET machinery required in order to handle a set of data, more specifically for the RecordSet object, which is very powerful and flexible in VB6 and does not have a direct equivalence in .NET. The approach reduces the manual changes effort to achieve functional equivalence.
The usage of System.Data.Common libraries provide the application with the ability to interact with different Database Manager Systems (e.g. SQL Server, Oracle, MS Access, etc) through its ADO.NET 2.0 compliant providers with just a minimal configuration effort and proper dialect changes.
Deployment Note:
This feature needs to be configured using a .NET configuration file containing specific sections. An example file is created in the output path of the migration solution. This file should be added to the main executable assembly and configured according to your needs by selecting the proper provider factory.
Class
Maps to
OracleInProcServer.OraSession / OracleInProcServer.OraSessionClass
System.Data.Common.DbConnection
OracleInProcServer.OraDatabase
System.Data.Common.DbCommand
OracleInProcServer.OraParameters
System.Data.Common.DbParameterCollection
OracleInProcServer.OraDynaset
UpgradeHelpers.DB.ADO.ADORecordSetHelper
OracleInProcServer.OraParameter
System.Data.Common.DbParameter
OracleInProcServer.OraSqlStmt
UpgradeHelpers.DB.ADO.ADORecordSetHelper
OracleInProcServer.OraField
UpgradeHelpers.DB.Essentials.FieldHelper
OracleInProcServer.OraFields
UpgradeHelpers.DB.Essentials.FieldsHelper
Original VB6 code:
C# code:
VB.NET code:
4.2. To COM Interop
This optional feature will take the legacy COM control and create an interoperability code wrapper to make it visible from the managed code. This means the control’s functionality will remain the same since it will use the same binary, but the resulting application will depend on the legacy control.
Original VB6 code:
C# code:
VB.NET code:
5. RDO
5.1. To ADO.NET using SqlClient
This optional feature allows the VB6 AI Migrator to convert RDO to plain ADO.NET by using the provider-specific System.Data.SqlClient libraries.
General Description:
This solution converts RDO data access patterns to plain ADO.NET specifically to interact with a SQL Server database.
This feature also supports the MSRDC data control.
Class
Maps to
RDO.rdoConnection
System.Data.SqlClient.SqlConnection
RDO.rdoResultset
System.Data.DataSet
RDO.rdoColumns
The property “rdoColumns.item” is the only supported member of this class.
RDO.rdoError
System.Data.SqlClient.SqlError
RDO.Parameter
System.Data.SqlClient.SqlParameter
RDO.Parameters
System.Data.SqlClient.SqlParameterCollection
RDO.rdoPreparedStatement
System.Data.SqlClient.SqlCommand
RDO.rdoQuery
System.Data.SqlClient.SqlCommand
Original VB6 code:
C# code:
VB.NET code:
5.2. To ADO.NET using System.Data.Common and helpers classes
This optional feature allows the VB6 AI Migrator to convert RDO to ADO.NET by using the System.Data.Common libraries and some helpers.
General Description:
This solution uses a set of helper objects to provide equivalent behavior in .NET and to encapsulate the ADO.NET machinery required to handle a set of data, more specifically, for the RecordSet object, which is very powerful and flexible in Visual Basic 6 and does not have a direct equivalent in .NET. This approach reduces the manual changes effort to achieve functional equivalence.
The usage of System.Data.Common libraries provide the application with the ability to interact with different Database Manager Systems (e.g. SQL Server, Oracle, MS Access, etc) through its ADO.NET 2.0 compliant providers with just minimal configuration effort.
This feature also supports the MSRDC data control.
Deployment Note:
This feature uses a .NET configuration file containing specific sections. An example file is created in the output path of the migration solution. This file should be added to the main executable assembly and configured according to your needs by selecting the proper provider factory.
Class
Maps to
RDO.rdoConnection
System.Data.Common.DbConnection
RDO.rdoResultset
UpgradeHelpers.DB.RDO.RDORecordSetHelper
RDO.rdoColumns
System.Data.DataColumnCollection
RDO.rdoParameter
System.Data.Common.DbParameter
RDO.rdoParameters
System.Data.Common.DbParameterCollection
RDO.rdoPreparedStatement
System.Data.Common.DbCommand
RDO.rdoQuery
System.Data.Common.DbCommand
RDO.rdoEngine
UpgradeHelpers.DB.RDO.RDOEngineHelper
RDO.rdoEnvironment
UpgradeHelpers.DB.RDO.RDOEnvironmentHelper
RDO.rdoColumn
System.Data.DataColumn
RDO.DataTypeConstants
System.Data.DbType
RDO.LockTypeConstants
UpgradeHelpers.DB.RDO.LockTypeConstants
RDO.QueryTypeConstants
System.Data.CommandType
Original VB6 code:
C# code:
VB.NET code:
5.3. To COM Interop
This optional feature will take the legacy COM control and create an interoperability code wrapper to make it visible from the managed code. This means the control’s functionality will remain the same since it will use the same binary, but the resulting application will depend on the legacy control.
Original VB6 code:
C# code:
VB.NET code:
6. SQLDMO
6.1. To Microsoft.SqlServer.Smo
Converts SQLDMO to ADO.Net by using Microsoft.SqlServer.Management.Smo libraries and some helpers.
General Description:
This solution uses a set of helper objects to provide equivalent behavior in .NET and to encapsulate the ADO.NET machinery required in order to handle a set of data, more specifically for the RecordSet object, which is very powerful and flexible in VB6 and does not have a direct equivalence in .NET. The approach reduces the manual changes effort to achieve functional equivalence.
The usage of Microsoft.SqlServer.Management.Smo libraries provide the application with a collection of objects designed for Microsoft SQL Server management.
Deployment Note:
This feature needs to be configured using a .NET configuration file containing specific sections. An example file is created in the output path of the migration solution. This file should be added to the main executable assembly and configured according to your needs by selecting the proper provider factory.
Class
Maps to
SQLDMO.Database
Microsoft.SqlServer.Management.Smo.Database
SQLDMO.FileGroups
Microsoft.SqlServer.Management.Smo.FileGroupCollection
SQLDMO.FileGroup
Microsoft.SqlServer.Management.Smo.FileGroup
SQLDMO.DBOption
Microsoft.SqlServer.Management.Smo.DatabaseOptions
SQLDMO.DRIDefault
Microsoft.SqlServer.Management.Smo.ScriptingOptions
SQLDMO.Index
Microsoft.SqlServer.Management.Smo.Index
SQLDMO.Job
Microsoft.SqlServer.Management.Smo.Agent.Job
SQLDMO.LogFile
Microsoft.SqlServer.Management.Smo.LogFile
SQLDMO.Login
Microsoft.SqlServer.Management.Smo.Login
SQLDMO.QueryResults
UpgradeHelpers.DB.ADO.ADORecordSetHelper
SQLDMO.SQLServer
Microsoft.SqlServer.Management.Smo.Server
SQLDMO.Table
Microsoft.SqlServer.Management.Smo.Table
SQLDMO.User
Microsoft.SqlServer.Management.Smo.User
Original VB6 code:
C# code:
VB.NET code:
6.2. To COM Interop
This optional feature will take the legacy COM control and create an interoperability code wrapper to make it visible from the managed code. This means the control’s functionality will remain the same since it will use the same binary but the resulting application will depend on the legacy control.
Original VB6 code:
C# code:
VB.NET code:
Last updated
Was this helpful?