-
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
Export of tbldef linked to Excel generates syntactically invalid .sql if Excel file is missing #282
Comments
I just noticed that, after the export, Access seems to have created a file in the temp directory matching the missing file name. Its contents are binary and kind of look like it might be .xls format, but Excel refuses to open it. Here's the output of the cygwin (linux)
Do you generate this or is this something Access does? |
I have worked around this by modifying my code to do what it should have done all along. Instead of depending on an old (now likely invalid), dangling linked table def, I create the link from scratch each time and then delete it when I'm done. |
I can see a case for declaring a limitation: "A DB with broken table links is in an invalid state and not eligible for source export" I'm fine with you deciding to close this as "WontFix" if you like. |
Thanks for posting more details on this. I think the intended behavior for the add-in would be to throw a non-fatal error when attempting to export a linked table that does not exist. I didn't catch from your description exactly what happens when it tries to export the definition for the missing table, but ideally it would be an error that shows up red on the console output, but the export continues to completion. |
Nothing unusual happens, the export completes normally with no error indication. I only caught this because I always review all the diffs in git gui to partition sets of related changes into individual commits. The diff for the TableDef showed that the output was invalid. |
That makes sense. Reviewing the code, it looks like it is |
That sounds like a reasonable approach. |
In my application I import data from a website that is downloaded in Excel format. The process is driven from VBA and involves:
I recently cleaned out temp files, which left the table link pointing at a no-longer-existing file. Prior to purging temp files, the export produced
I ran an export after purging temp files, and the output was the following (note the missing open parenthesis)
This is probably a low impact problem. I'm going to investigate changing my code to not leave potentially dangling linked tables around, which will avoid this issue.
The text was updated successfully, but these errors were encountered: