-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unavailable Linked Table during Export #417
Comments
@AZDeveloper777 - Gracefully handling the error from a missing drive should be pretty simple... The other question about skipping certain objects is a bit more involved. That being said, I think it is a very legitimate scenario where a development machine may not have access to all of the network resources required for a full export. Of course we could just handle the error and move on, but some connections like remote SQL tables might take several seconds to time out, causing a significant delay on every export operation. For cases like this I could see the value of having a way to exclude certain objects, but only on certain machines. We wouldn't want to save this in I recently implemented Open to suggestions... 😄 |
I think skipping linked tables that aren't ODBC and aren't available would be a good compromise. I'm pretty sure that my error handling for Err.Number = 68 accomplishes that since an ODBC table shouldn't generate that number if it isn't available. |
This seems related to #282. It appears having unavailable tables/data when building causes issues (which, honestly, it should). Perhaps trapping this error and stopping gracefully would be appropriate? @joyfullservice |
Discussed in #416
Originally posted by AZDeveloper777 July 28, 2023
I'm using Access 2010 with v4.0.15-beta.
I have linked tables in my applications MDB that are unavailable in my development environment.
When I click "Export Source Files" in the ribbon bar and it gets to the "Exporting tables ... " section, I get "Run-time error '68': Device unavailable". I did a bit of debugging and it is failing in GetUncPath(strPath As String) on the line With FSO.GetDrive(strDrive).
This makes sense as the drive letter doesn't exist on my development machine.
Is there a way to make the tool skip over linked tables that aren't available ?
Here is my fix.
Private Sub IDbComponent_Export(Optional strAlternatePath As String)
On Error GoTo IDbComponent_Export_Error
'Get the export file name
strFile = Nz2(strAlternatePath, IDbComponent_SourceFile)
IDbComponent_Export_Exit:
Exit Sub
IDbComponent_Export_Error:
If Err.Number = 68 Then 'Drive not available
GoTo IDbComponent_Export_Exit
Else
Resume Next
End If
End Sub
The text was updated successfully, but these errors were encountered: