This very good piece of code was posted last week as a solution to populating a Data Set with an Objectdatasource.
I am now trying to populate a Data Set from a AccessDataSource.
But replacing the ObjectDataSource with an AccessDataSource doesn't seem to work.
What modifications to the code are needed please !?
Private Function GetDS(ods As ObjectDataSource) As DataSetDim
ds = New DataSet()
Dim dv = DirectCast(ods.[Select](), DataView)
If dv IsNot Nothing AndAlso dv.Count > 0 Then
Dim dt = dv.ToTable()ds.Tables.Add(dt)
End IfReturn dsEnd Function
View Complete Post