title: Is there a way to retrieve the view definition from a SQL Server using plain ADO?
body: <p>I'm successfully extracting column definitions from databases hosted on a SQL server using the ADO Connection <code>OpenSchema()</code> call in its various incarnations so I can programmatically recreate those tables in another SQL database. So far, so good.</p>
  
  <p>The main interaction with the above tables happens using multiple views; while <code>OpenSchema()</code> is able to return the column definitions for the view in the same way that it returns column definitions for a table, a crucial bit of information is missing - which table and column in the underlying tables the column in the view maps to.</p>
  
  <p>I tried to access the SQL command used to create the view using ADOX Catalog Views, but it appears that the OLEDB driver for SQL Server that we're using doesn't support this functionality.</p>
  
  <p>Is there any way to get at this information for the view configuration via ADO, either in a way that states "ColumnX maps to ColumnY in table Z" or in the form of the actual SQL command used to create the view?</p>