I have a TreeView Control (that should look like this)

But I don’t know how to populate it with my query:
SELECT T.TableName, C.Column_Name FROM Information_Schema.Tables T
INNER JOIN Information_Schema.Columns C
ON T.TableName= C.TableName
WHERE T.TableName IN('BASE_TABLE', 'BASE TABLE')
ORDER BY 1, C.Ordinal_Position
Can anyone help me please…
Thanks.
Edit
This is what I tried, but just the table names…
private void PopulateTreeView()
{
SqlCeCommand cmd = new SqlCeCommand();
try
{
using (SqlCeConnection conn = new SqlCeConnection("Data Source=" + connString))
{
cmd.CommandType = CommandType.Text;
cmd.CommandText = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES";
conn.Open();
cmd.Connection = conn;
cmd.ExecuteNonQuery();
// Don't know what's next...
}
}
catch (Exception x)
{
MessageBox.Show(x.GetBaseException().ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finally
{
cmd.Dispose();
}
}
Here’s a non-LINQ answer that does something simmilar: