Results 1 to 5 of 5

Thread: OpenSchema Problem

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    Turkey
    Posts
    49
    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



  2. #2
    Guest
    Hi, try using "*Sys*" in ur filter. This has worked for me.

    All the best...vijay

  3. #3

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    Turkey
    Posts
    49

    Thumbs down

    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...

  4. #4
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    How about "TABLE_NAME NOT like 'MSys*'"

    Cheers,

    Paul.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  5. #5

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    Turkey
    Posts
    49

    Thumbs down

    Thanks paulw,

    But it didn't work too, I tried it before

    any other ideas please...

    World is hard to live but the only reason is inequality between the lives...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width