E
ericgj
Why is any access to items in the tables collection (and perhaps other
collections in ADOX) so incredibly slow? Can anything be done to speed it
up? This seems like a well-known problem, but I have yet to see any
work-around. I have tried referencing by name or by index, it makes no
difference.
FYI, Ultimately what I am trying to do is get the back-end database path
based on a particular linked table in the front-end database. I thought the
easiest way would be to look at the "Jet OLEDB:Link Datasource" property of
the table object in the ADOX.catalog. But trying to access the tables
collection is a performance killer. Here's the code:
Dim cnn As ADODB.Connection
Dim cat As New ADOX.Catalog
Dim tbl As ADOX.Table
Set cnn = CurrentProject.Connection
Set cat.ActiveConnection = cnn
Set tbl = cat.Tables(strTable) ' hangs up for a good 10 seconds on
this line
If tbl.Type = "LINK" Then _
getSourceMDB = tbl.Properties("Jet OLEDB:Link Datasource").value
Thanks for any suggestions.
collections in ADOX) so incredibly slow? Can anything be done to speed it
up? This seems like a well-known problem, but I have yet to see any
work-around. I have tried referencing by name or by index, it makes no
difference.
FYI, Ultimately what I am trying to do is get the back-end database path
based on a particular linked table in the front-end database. I thought the
easiest way would be to look at the "Jet OLEDB:Link Datasource" property of
the table object in the ADOX.catalog. But trying to access the tables
collection is a performance killer. Here's the code:
Dim cnn As ADODB.Connection
Dim cat As New ADOX.Catalog
Dim tbl As ADOX.Table
Set cnn = CurrentProject.Connection
Set cat.ActiveConnection = cnn
Set tbl = cat.Tables(strTable) ' hangs up for a good 10 seconds on
this line
If tbl.Type = "LINK" Then _
getSourceMDB = tbl.Properties("Jet OLEDB:Link Datasource").value
Thanks for any suggestions.