|
-
December 10th, 1999, 05:03 PM
#1
Table Names
I used to use a little code to get the table names for my programs like this...
Private Function GetTbl()
Dim TblNM As String
Dim mytest As String
Set db = OpenDatabase(dbOPEN)
For Each tbl In db.TableDefs
TblNM = tbl.Name
mytest = Left$(TblNM, 3)
If mytest <> "MSy" Then
List1.AddItem TblNM ' + fld.Name
Debug.Print TblNM ', fld.Name
End If
Next
End Function
Now I am learning ADO and I don't know how to get the table names.
Please help.
Thank you
Leo Koach
[email protected]
-
December 10th, 1999, 05:54 PM
#2
Re: Table Names
Hello,
you do not have a collection like before but you can use a 'schema', wich is much like a recordset containing all the infos you need.
set conntemp=server.createobject("adodb.connection")
conntemp.open parmDSN
on error resume next
set rsSchema=conntemp.OpenSchema(???)
The ??? value ranges from 1 to 30, the one you are looking for is 21 but try out the others!
bye
Gianandrea
http://www2.lario.com/dna
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
|