Data Adapter (move records from one system to another)

This function “receives” an ADODB.Recordset and converts it to a datatable.

Imports System.Data.OleDb
Public Function RecordSetToDataTable(ByVal objRS As ADODB.Recordset) As DataTable
Dim objDA As New OleDbDataAdapter()
Dim objDT As New DataTable()
objDA.Fill(objDT, objRS)
Return objDT
End Function

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s