joyfullservice / msaccess-vcs-addin

Synchronize your Access Forms, Macros, Modules, Queries, Reports, and more with a version control system.
Other
195 stars 39 forks source link

VCS 4.0.34: Unhandled error when exporting missing linked table #500

Open HughWarrington opened 3 months ago

HughWarrington commented 3 months ago
-------------------------------------
my_database.mdb
VCS Version 4.0.34
Performing Full Export
22/03/2024 13:30:09
-------------------------------------

Running with debug enabled.

image

image

I think the screenshots help explain what's going on.

It's trying to export data from a table. clsDbTableData.GetTableExportSql has generated a select query that is missing the ORDER BY columns at the end. I'm guessing this is because the table in question is a linked table that cannot be found on disk.

I'm not sure what the conventions are in this project (or in Access/VB in general) but perhaps we should instead log a meaningful warning saying 'missing linked table' or similar.

joyfullservice commented 3 months ago

Yes, it looks like we should test to ensure the table exists and is available before attempting an export of the data. Good idea!

joyfullservice commented 3 months ago

Added some code to ensure the availability of the target for linked tables, and logs the error more clearly for the user.

image

HughWarrington commented 3 months ago

Brilliant! Thank you.

hecon5 commented 3 weeks ago

If this is working @HughWarrington, can you close it? Thank you!