i was planning to convert my vb6 program to vb2010 but sometimes the codes from vb6 was unable accept in vb2010.

like

adodc.recordset.xxxxxxxx

help me please

Without a context that line could be almost anything. ADO works just fine in newer versions of VB. Tell me what you are trying to do and I'll try topo give you some sample code. For example, the following code uses ADO to retrieve a recordset and populate a listview.

Imports ADODB

Public Class Form1

    Private Sub btnADO_Click(sender As System.Object, e As System.EventArgs) Handles btnADO.Click

        'ADO is the underlying layer for both SqlClient and OLEDB

        ListView1.Items.Clear()

        Dim con As New ADODB.Connection
        Dim rec As New ADODB.Recordset

        con.Open("Driver={SQL Server};Server=.\SQLEXPRESS;Database=PUBS;Trusted_Connection=yes;")
        rec.Open("SELECT au_lname,au_fname,zip FROM authors WHERE au_lname like 'S%'", con, CursorTypeEnum.adOpenStatic)

        Do Until rec.EOF
            ListView1.Items.Add(New ListViewItem({rec("au_lname").Value, rec("au_fname").Value, rec("zip").Value}))
            rec.MoveNext()
        Loop

        rec.Close()
        con.Close()

    End Sub
This article has been dead for over six months. Start a new discussion instead.