D
Developer98115
I need help getting schema information from an existing SQL Server
database. My thought was that you could use ADOX via InterOp. Has
anyone done this successfully and how? I have created a Interop
reference to the ADOX COM component from my C# project. I am able to
open the SqlConnection successfully but it fails with an exception
["No such interface supported"] when I try to set the
..ActiveConnection property of the ADOX database catalog object.
Another strange thing I noticed is that even when you declare and
ADOX.Catalog, the intellisense never lets you create a new
ADOX.Catalog so I ended up creating a ADOX.CatalogClass instead --
something very strange here. Thanks in advance.
SqlConnection sqlConnection = new SqlConnection( myConnectionString );
sqlConnection.Open();
ADOX.Catalog databaseCatalog = new
ADOX.CatalogClass()this.databaseCatalog.ActiveConnection =
sqlConnection;
database. My thought was that you could use ADOX via InterOp. Has
anyone done this successfully and how? I have created a Interop
reference to the ADOX COM component from my C# project. I am able to
open the SqlConnection successfully but it fails with an exception
["No such interface supported"] when I try to set the
..ActiveConnection property of the ADOX database catalog object.
Another strange thing I noticed is that even when you declare and
ADOX.Catalog, the intellisense never lets you create a new
ADOX.Catalog so I ended up creating a ADOX.CatalogClass instead --
something very strange here. Thanks in advance.
SqlConnection sqlConnection = new SqlConnection( myConnectionString );
sqlConnection.Open();
ADOX.Catalog databaseCatalog = new
ADOX.CatalogClass()this.databaseCatalog.ActiveConnection =
sqlConnection;