|
-
Jun 16th, 2004, 04:02 AM
#1
Thread Starter
Addicted Member
systables
Could someone tell me what is the MS access (2000) equivalent of systables.
Thanks
Simon
-
Jun 16th, 2004, 07:31 AM
#2
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.
-
Jun 16th, 2004, 07:34 AM
#3
Thread Starter
Addicted Member
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
-
Jun 16th, 2004, 07:40 AM
#4
If you're trying to add new objects to exsisting db then look at my respond in this thread .
-
Jun 16th, 2004, 07:42 AM
#5
Thread Starter
Addicted Member
Nope just wanted a list of tables, so I could let my users select one.
Simon
-
Jun 16th, 2004, 07:47 AM
#6
OK, here we go (you'll need to set references to that same library I've mentioned in that thread):
VB Code:
Private Sub Command1_Click()
'============================
Dim que As ADOX.Table
Dim cat As ADOX.Catalog
Dim cnn As ADODB.Connection
Dim i%
Set cnn = New ADODB.Connection
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & App.Path & "\biblio.mdb;"
Set cat = New ADOX.Catalog
Set cat.ActiveConnection = cnn
For Each que In cat.Tables
If Not InStr(1, LCase(que.Name), "sys") > 0 Then
Debug.Print vbNewLine & que.Name
For i = 0 To que.Columns.Count - 1
Debug.Print que.Columns(i).Name & vbTab & que.Columns(i).Type & vbTab _
& que.Columns(i).DefinedSize & vbTab & que.Columns(i).Attributes
Next i
End If
Next
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|