How do I take all columns and indexes of Access a table? (.NET)

zhaozj2021-02-16  130

The Access database is different from Oracle and SQL Server, the system table does not provide information such as column information and index, so take this information is not a simple SQL statement to be completed, check it, use Adox to complete these features ( Adox can also be referenced in NET, but OLEDBConnection provides a good method information in .NET: DataTable mydbschemaguid_col = conn.getoledbschematable (OLEDBSChemaGuid.columns, new object [] {null, null, this.tablename} ); Column index: dataatable mydbschemaguid = conn.getoledbschematable (OLEDBSChemaGuid.indexes, new object [] {null, null, null};

Specific usage can check the help of .NET :)

The above is purely throwing bricks!

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

New Post(0)