I successfully retrieve column definitions from databases hosted on an SQL server using the ADO Connection OpenSchema() call in my various incarnations so that I can programmatically recreate these tables in another SQL database. So far so good.
The main interaction with the above tables occurs using several types; while OpenSchema() can return column definitions for a view in the same way that it returns column definitions for a table, there is no critical bit of information - which table and column in the base tables the column in the view maps to.
I tried to access the SQL command used to create the view using the ADOX directory views, but it looks like the SQL Server OLEDB driver that we use does not support this functionality.
Is there any way to get this information to configure the view through ADO, either in such a way that "ColumnX maps to ColumnY in table Z" or in the form of the actual SQL command used to create the view?
sql-server view ado
Timo Geusch Jan 22 2018-11-11T00: 00Z
source share