Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Scripting >> Perl >> ADODB >> How to list tables in access database file

#---- CommandTypeEnum Values ----; use constant adCmdText => 0x0001; #---- CursorTypeEnum Values ----; use constant adOpenKeyset => 1; #---- LockTypeEnum Values ----; use constant adLockReadOnly => 1; use constant adSchemaTables => 20; $accessfile = "access2002.mdb"; use OLE; # use Win32::OLE $Conn = CreateObject OLE "ADODB.Connection"; $RS_Tables = CreateObject OLE "ADODB.Recordset"; $Conn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=$accessfile"); $RS_Tables = $Conn->OpenSchema(adSchemaTables); while ( !$RS_Tables->EOF ) { $table = $RS_Tables->{TABLE_NAME}->Value; if ( !($table =~ /MSys/) ) { print "table = $table\n"; } $RS_Tables->MoveNext; } $RS_Tables->Close; $Conn->Close;
[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]