Convert SQLDataSource to DataTable

Sometimes I find the need to convert a SQLDataSource to a DataTable. Here's how to do it:

Dim dv As DataView = New DataView()

Dim dt As New DataTable

dv = Me.sqldsData.Select(DataSourceSelectArguments.Empty)

dt = dv.ToTable()

Published Thursday, April 02, 2009 1:46 PM by bunbun
Filed under:

Comments

No Comments

Leave a Comment

(required) 
(required) 
(optional)
(required)