Use .NET to get the architecture of the OLEDB database.

xiaoxiao2021-03-06  70

Getting information from the SQL Server database can use the DMO component or directly acquire information of the system table, such as a table, view, stored procedure, and the like, the information of the column exists in the syscolumns table. If you want to get information on the OLEDB database, such as the database of Access. Firstly, COM components Microsoft ActiveX Data Object 2.x Library and Microsoft ADO Ext. 2.x for DDL ... The following is C # code: string strconnection = "provike = microsoft.jet.Oledb.4.0; data source =" C: //Test.mdb "; adoDb.connection conn = new adoDb.connectionclass (); conn.connectionString = strconnection; conn.open (StrConnection," admin ",", 0); adox.catalog ctg = new adox.catalogClass (); CTG.LET_ACTIVECONNECTION (CONN); // GET TABLES INFO from OLEDB Database for (INT I = 0; I

转载请注明原文地址:https://www.9cbs.com/read-92042.html

New Post(0)