View Single Post
  #4  
Old September 22nd, 2004, 10:24 AM
Alp
external usenet poster
 
Posts: n/a
Default

Hi Tim,

A further development; I did a TransferDatabase to get that table into the
db with a name using a property of the ext db. Now I do have another
struggle:
I need to reach the db.containers for documentation as txt files. I have the
necessary code that works within the db but I need to get it to work from an
external db.

Should I post this as a new thread?

Thanks,

Alp


"Tim Ferguson" wrote in message
...
"Alp" wrote in :

I would like to query an mdb's/mde's MSysObjects from another
database. Sole purpose of this is to get the object names, creation &
update dates and what they are (types).


set db = ws.OpenDatabase(strPath, true, true)
Set rs = db.OpenRecordset( _
"SELECT Something, SomethingElse " & vbcrlf & _
"FROM MSysObject" & vbCrLf & _
"WHERE ObjectType = 409" & vbCrLf & _
"ORDER BY SomethingElse", _
dbOpenSnapshot, dbForwardOnly

With rs
.DoSomethingUseful

End With


I strongly suspect you will run into permission problems, but you can
always have a go. There probably is something in the square-bracket
syntax you could use:

SELECT Something, SomethingElse
FROM MySysObjects IN [Database=f:\someonesdata\someonesdb.mdb]
WHERE etc, etc

but I don't use that very often. Bear in mind that the structure of the
system tables is not documented and not guaranteed to remain the same in
subsequent versions of Access.

HTH


Tim F