Click to See Complete Forum and Search --> : Getting tables
Tonatiuh
Jul 11th, 2000, 04:50 PM
I have an Access database wich contains forms. WHen I open the database, I just see the form and I can't see the tables and the fields. It has any kind of protection.
Is there any way to know how many and the names of the tables that it have? Is there any way to see this structures in the current protected state?
I need to know the database structure.
first thing to try is 'F11'.
next thing is keep 'SHIFT' pressed while opening the db.
if that doesn't work, you could try to open th db from VB and use either DAO or ADOX to check the data structure. it could still be, that the db is password protected, then you are in trouble.
best regards
Sascha
Tonatiuh
Jul 11th, 2000, 08:21 PM
I have checked the reference: Microsoft ActiveX Data Objects 2.1 Library. But it doesn't provide me with the ADOX datatype.
What reference do I need?
Psyrus
Jul 11th, 2000, 08:34 PM
If you want the ADO data control you must add it from the Components. It's Microsoft ADO Data Control 6.0 and add the Reference to Microsoft ActiveX Data Objects 2.0 Library.
Tonatiuh
Jul 12th, 2000, 08:18 AM
Thanks for the info! NO, I don't have the code.
Clunietp
Jul 13th, 2000, 01:37 AM
here is some code I wrote previously to list all tables and stored procedures in a DB
'uses ADO 2.x and ADO 2.x for DDL and Security
Dim objCn As New Connection
Dim objCat As ADOX.Catalog
Dim objProc As ADOX.Procedure
Dim objTable As ADOX.Table
objCn.Open <ConnectionString>
Set objCat = New Catalog
objCat.ActiveConnection = objCn
Debug.Print "============== TABLES ============="
For Each objTable In objCat.Tables
Debug.Print objTable.Name
Next objTable
Debug.Print "============== STORED PROCEDURES =================="
For Each objProc In objCat.Procedures
Debug.Print objProc.Name
Next objProc
objCn.Close
Set objCat = Nothing
Set objCn = Nothing
Tonatiuh
Jul 13th, 2000, 08:46 AM
A thousand of THANKS for your halep!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.