I need to list all tables name from access database...
but only for table where left 2 is numeric. (see image)
note:
i use ADO and Vb6
list table named from access database
-
- PlatinumLounger
- Posts: 4515
- Joined: 26 Apr 2010, 17:36
list table named from access database
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 79526
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- PlatinumLounger
- Posts: 4515
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 79526
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: list table named from access database
Actually, it doesn't matter.
Open a recordset with the following SQL.
If you use DAO:
If you use ADODB:
Open a recordset with the following SQL.
If you use DAO:
Code: Select all
SQL = "SELECT MSysObjects.Name FROM MSysObjects WHERE MSysObjects.Name Like '[0-9][0-9]*' AND MSysObjects.Type=1"
Code: Select all
SQL = "SELECT MSysObjects.Name FROM MSysObjects WHERE MSysObjects.Name Like '[0-9][0-9]%' AND MSysObjects.Type=1"
Best wishes,
Hans
Hans