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
..ActiveConnect ion 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.CatalogCla ss instead --
something very strange here. Thanks in advance.
SqlConnection sqlConnection = new SqlConnection( myConnectionStr ing );
sqlConnection.O pen();
ADOX.Catalog databaseCatalog = new
ADOX.CatalogCla ss()this.databa seCatalog.Activ eConnection =
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
..ActiveConnect ion 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.CatalogCla ss instead --
something very strange here. Thanks in advance.
SqlConnection sqlConnection = new SqlConnection( myConnectionStr ing );
sqlConnection.O pen();
ADOX.Catalog databaseCatalog = new
ADOX.CatalogCla ss()this.databa seCatalog.Activ eConnection =
sqlConnection;
Comment