-
Hi there,
I am using a Access database and I want to retrieve the tables in a database except system tables, but some problem is arrising while the "filter" line is being executed. My code is written below;
'------------------------------------------------------
Option Explicit
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Private Sub Command1_Click()
Set rst = cnn.OpenSchema(adSchemaColumns)
rst.Filter = "NOT TABLE_NAME like 'Msys%'" 'Problem occurs
Set dbg.DataSource = rst
End Sub
Private Sub Form_Load()
Set cnn = New ADODB.Connection
Set rst = New ADODB.Recordset
With cnn
.Mode = adModeReadWrite
.CursorLocation = adUseClient
.Open "some_dns"
End With
End Sub
'------------------------------------------------------
any idea may help...
Thanks in advance
-
Hi, try using "*Sys*" in ur filter. This has worked for me.
All the best...vijay
-
Thanks Gantibabu,
But it didn't work, It works with the
"TABLE_NAME like 'Msys%'"
when 'NOT' is included then err.number=3001 is generated
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
I hate this error because it is not so simple to debug, a lot of things may be source for this.
Any other ideas please.....
Thanks in advance...
-
How about "TABLE_NAME NOT like 'MSys*'"
Cheers,
Paul.
-
Thanks paulw,
But it didn't work too, I tried it before
any other ideas please...