How do I determine the Schema name of a database? Is it the name of the database?
Also how do I find the properties of a Schema.
I searched Access help.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Schema Name? (A97 & Axp)
No, I am not trying to work with XML data. I am reading a book on SQL and they refer to the property Schema.
Evidently DB2, Oracle, MySQL, & SQL server have a Schema property.
So, I thought that Access probably had a Schema property also.
Schema refers to the collection of objects in a database.
For example the following query will list all the tables in a SQL database with a Schema name of ‘SMEAGOL’.
select table_name
from information_schema.tables
where table_schema = ‘SMEAGOL’
The Connection object in ADO has an OpenSchema method. In Access 2000 and higher you could do something like this:
Public Sub OpenSchemaX()
Dim cnn1 As ADODB.Connection
Dim rstSchema As ADODB.Recordset
Set cnn1 = CurrentProject.Connection
Set rstSchema = cnn1.OpenSchema(adSchemaTables)
Do Until rstSchema.EOF
Debug.Print “Table name: ” & _
rstSchema!TABLE_NAME & vbCr & _
“Table type: ” & rstSchema!TABLE_TYPE & vbCr
rstSchema.MoveNext
Loop
rstSchema.Close
Set rstSchema = Nothing
Set cnn1 = Nothing
End Sub
This won’t work in Access 97 since it has no CurrentProject object.
BTW Access stores metadata in system tables. You can view them if you tick the check box “System Objects” in the View tab of Tools | Options…
Info about database objects such as tables can be found in the MSysObjects table. If you search for MSysObjects in this forum, you’ll find some examples where this table is used.
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications