Results 1 to 6 of 6

Thread: systables

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Posts
    211

    systables

    Could someone tell me what is the MS access (2000) equivalent of systables.

    Thanks

    Simon

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132
    Go to Tools > Options ans select View tab. Check System objects and click Apply. You should by now see all system objects in your DB window.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Posts
    211
    Code:
            
        Set Access_Conn = CreateObject("ADODB.Connection")
        
        DataBase_Path = Me.File1.Path & "\" & Me.File1
        DataBase_Path = Replace(DataBase_Path, "\\", "\")
            
        Access_Conn.ConnectionString  "Provider=Microsoft.JET.OLEDB.4.0;Data Source=" & DataBase_Path
        Access_Conn.Open
        Set SQL_RS = Access_Conn.OpenSchema(adSchemaTables)
       
        Do While SQL_RS.EOF = False
            Me.List1.AddItem (SQL_RS.Fields("table_name"))
            SQL_RS.MoveNext
        Loop
    
        Access_Conn.Close
    this seems to work, the msysobjects just gives you a permission denied error.

    Simon

  4. #4
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132
    If you're trying to add new objects to exsisting db then look at my respond in this thread .

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Posts
    211
    Nope just wanted a list of tables, so I could let my users select one.

    Simon

  6. #6
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132
    OK, here we go (you'll need to set references to that same library I've mentioned in that thread):
    VB Code:
    1. Private Sub Command1_Click()
    2. '============================
    3. Dim que As ADOX.Table
    4. Dim cat As ADOX.Catalog
    5. Dim cnn As ADODB.Connection
    6. Dim i%
    7.  
    8.     Set cnn = New ADODB.Connection
    9.     cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    10.                 "Data Source=" & App.Path & "\biblio.mdb;"
    11.    
    12.     Set cat = New ADOX.Catalog
    13.     Set cat.ActiveConnection = cnn
    14.     For Each que In cat.Tables
    15.         If Not InStr(1, LCase(que.Name), "sys") > 0 Then
    16.             Debug.Print vbNewLine & que.Name
    17.             For i = 0 To que.Columns.Count - 1
    18.                 Debug.Print que.Columns(i).Name & vbTab & que.Columns(i).Type & vbTab _
    19.                             & que.Columns(i).DefinedSize & vbTab & que.Columns(i).Attributes
    20.             Next i
    21.         End If
    22.     Next
    23.  
    24. End Sub

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