joyfullservice / msaccess-vcs-addin

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

Error 2128 on rebuild #552

Open HughWarrington opened 8 hours ago

HughWarrington commented 8 hours ago

I'm using addin version 4.0.34, Office 365 64-bit, Win10 64-bit.

I did a full export of my frontend .mdb, having set both the sanitise options to Off (I had to manually apply the fix for #537 first). Then took the .src folder and ran a Build As....

During the rebuild I got an error dialog:

Run-time error '2128':

Microsoft Access encountered errors while importing BackendCreate.

Here's some relevant info from the debugger at the line of code with the exception:

image

I'm afraid I can't upload the whole BackendCreate.bas file for commercial reasons. But it is notable that by alphabetical order, it is the first file inside the forms folder. In other words, it was probably the first form to be imported, suggesting a systematic error affecting all forms rather than just this one.

I didn't get this error until I changed the sanitise options to Off. Previously they were both set to Standard.

hecon5 commented 6 hours ago

I have also had this happen...and it turned out to be a reference in that file which didn't correctly load.

@joyfullservice: if you turn off Sanitize options, does the UTF8 conversion still happen? I thought it did, but now I'm not so sure.

joyfullservice commented 2 hours ago

@joyfullservice: if you turn off Sanitize options, does the UTF8 conversion still happen? I thought it did, but now I'm not so sure.

Yes, the export file is written in UTF-8 regardless of the sanitize option used. Here is the line in SaveComponentAsText that writes the file as UTF-8. (The default encoding for the WriteFile function.)

image