I have a split db, with a number of possible data databases (same design, different data). I wanted to allow my users to select which set of data they wanted to use, so I adapted the Dev Ashish 'fRefreshLinks' code to allow this. When the datasets are all on the local hard drive, this works fantastically well.
Now my customer wants to run the app on the C drive, but with the data on the D drive, so that it can't be modified in any way.
I can use the Linked Table Manager to manually point to the datasets on the D drive, and the app runs fine (albeit more slowly). But when fRefreshLinks is used to do it programatically, it gives error 3051: Jet cannot open dbasename. Already opened exclusively or permissions needed.
It is the line Set dblink = dbengine(0).opendatabase(strdbpath) that is generating the error.
Can anyone help me overcome this?
Thanks in advance.
Now my customer wants to run the app on the C drive, but with the data on the D drive, so that it can't be modified in any way.
I can use the Linked Table Manager to manually point to the datasets on the D drive, and the app runs fine (albeit more slowly). But when fRefreshLinks is used to do it programatically, it gives error 3051: Jet cannot open dbasename. Already opened exclusively or permissions needed.
It is the line Set dblink = dbengine(0).opendatabase(strdbpath) that is generating the error.
Can anyone help me overcome this?
Thanks in advance.