Posted on: 10/1/2015 4:31:30 PM | Views : 966

Issue:
Code makes, what in theory is a compact way to get all the column names from a table, (it's a temp table created by stored procedure) and then push the data into a CSV. However it's not liking "dsNames.Columns" or "dsNames.Rows" and I'm not sure what I should use instead. I've tried Datatow and ds and sb just encase!
Code:
Public Sub PrcCreateCSV(vDateString As String) Dim sConnString As String = System.Web.Configuration.WebConfigurationManager.ConnectionStrings("SQL").ConnectionString Dim dsNames As SqlDataSource dsNames = New SqlDataSource dsNames.ConnectionString = sConnString Dim sSQL As String sSQL = "SELECT * FROM '" & vDateString & "" '<-- Don't worry it will be amended to the columns! dsNames.SelectCommand = sSQL Dim sb As New StringBuilder() Dim columnNames A ...

Go to the complete details ...