How to get all columns name of Sql table in string in

you can try this code for retrieving all column’s name of sql table in single string in

  Private Function GetColumnsName() As String
        Dim dsColumnName As New DataSet
        Dim Con As New SqlClient.SqlConnection(ConnectionString)
        Dim strSql As String = "SELECT column_name FROM INFORMATION_SCHEMA.Columns where TABLE_NAME = '" & TableName & "'"
        Dim dAdapter As New SqlClient.SqlDataAdapter(strSql, Con)
        Dim ColumnsName_String As String = ""
        For i As Integer = 0 To dsColumnName.Tables(0).Rows.Count - 1
            ColumnsName_String = ColumnsName_String & "," & dsColumnName.Tables(0).Rows(i).Item(0)
        If ColumnsName_String.StartsWith(",") Then
            ColumnsName_String = ColumnsName_String.Remove(0, 1)
        End If
        Return ColumnsName_String

    End Function