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 < ctg.tables.count-1; i++) { console.writeline( ctg.tables[ i ].name ); }
// get columns information from a table named test. adox.table table = ctg.tables[ "test" ]; for( int i = 0 ; i < table.columns.count - 1; i++) { adox.column column = table.columns[ i ]; console.writeline( column.name + “/t“ + columns.type.tostring() + column.defaultsize.tostring() ); }