I want to get all "table" names from a OdbcConnection, and for all "table" names I want to recieve all column names.
So I came across the OdbcConnection.GetSchema()
functionallity. I manges to get all the table names by simply using connection.GetSchema("Tables")
. But now I want to get the column information for those tables. I noticed connection.GetSchema("Columns")
will give me columns information, but this only gives it from a random/first (?) "table" in the datasource (using Windows CSV driver), which doesn't help very mutch.
The most challenging part is, that would have to work with any (most) ODBC drivers. I won't know which underlying datasource will be used.
Any ideas?