Search code examples
vb.netwinformsvb6recordsetvb6-migration

VB6 ADO data control equivalent to vb.net?


I am migrating vb6 projects to vb.net, Few components are not able to migrate properly with upgrade issues. So I want to manually program those things. But I can't recognize what is the equivalent component available in vb.net.

eg., I used Data grid view control alternative to MS Flex Grid control In vb6.

But I couldn't find "VB.Data" control in vb.net.

VB this control,

 Begin VB.Data Sap 
  Caption         =   "Data1"
  Connect         =   "Access"
  DatabaseName    =   "edit.mdb"
  DefaultCursorType=   0  'DefaultCursor
  DefaultType     =   2  'UseODBC
  Exclusive       =   0   'False
  Height          =   345
  Left            =   10680
  Options         =   0
  ReadOnly        =   0   'False
  RecordsetType   =   1  'Dynaset
  RecordSource    =   "Sap code"
  Top             =   6360
  Visible         =   0   'False
  Width           =   1140

End

then it is in vb.net migration like this,

  Me.Sap.BackColor = System.Drawing.Color.Red
    Me.Sap.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
    Me.Sap.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Sap.ForeColor = System.Drawing.Color.Black
    Me.Sap.Location = New System.Drawing.Point(712, 424)
    Me.Sap.Name = "Sap"
    Me.Sap.Size = New System.Drawing.Size(76, 23)
    Me.Sap.TabIndex = 2
    Me.Sap.Text = "Sap"
    Me.Sap.Visible = False

Solution

  • Use OLEDB in alternative to Data control. this may help you!