>Imports System.Data.OleDb > >Public Class Data > > Inherits ErrorHandler > > ' SQL adapter into a DataView > ' expC1 SQL command > ' expC2 Path of the table > Public Shared Function VFPSQLAdapterDataView(ByVal tcSQL As String, ByVal tcTable As String) As DataView > Dim loData As DataSet > Dim loView As DataView > ErrorInitialize() > loData = New DataSet > Try > Dim loDT As New OleDbDataAdapter(tcSQL, _ > "Provider=VFPOLEDB.1;Data Source=" + tcTable + ";Password='';Collating Sequence=MACHINE") > > loDT.Fill(loData, "Temp") > > ' Get it into a view > loView = loData.Tables("Temp").DefaultView > > Catch loError As Exception > ErrorSetup(loError) > End Try > > Return loView > End Function >>
Dim loView As DataViewto
Dim loView As DataView = Nothing