Skip to content
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

Crash when exporting using Database Option #563

Closed
ronmcca opened this issue Nov 5, 2024 · 8 comments
Closed

Crash when exporting using Database Option #563

ronmcca opened this issue Nov 5, 2024 · 8 comments

Comments

@ronmcca
Copy link

ronmcca commented Nov 5, 2024

The export failed because of a connection string error when I added the database option.
clsScemaMsSql
lDbScema
Export

Error Line: If (m_ModifiedItems.Count = 0) And (m_Files.Count = m_AllItems.Count) Then

Adding a test for m_ModifiedItems is Nothing got it past the line

If m_ModifiedItems Is Nothing Then
    
ElseIf (m_ModifiedItems.Count = 0) And (m_Files.Count = m_AllItems.Count) Then
@joyfullservice
Copy link
Owner

If you click the link to test the filter, do you get a number of objects returned?

image

When you say a connection string error, do you mean that your system is unable to connect to the database? We can probably add some additional error handling around this, but it would be helpful to understand more about the issue you are experiencing.

@ronmcca
Copy link
Author

ronmcca commented Nov 5, 2024 via email

@joyfullservice
Copy link
Owner

I included screen shots but then did not show.

Just a tip, but if you are on the GitHub web page for this issue, you can paste a screen shot image directly into the comment and it will automatically generate the image file and link it for you. That's what I do most of the time when I need to include a screen shot.

Maybe I am missing something obvious here, ...but why are you removing the database connection and putting in an invalid connection string? Or are you just demonstrating that it doesn't handle the error very gracefully if the connection string is invalid?

If you can elaborate a bit more on what you are wanting to do, or what you expect the intended behavior to be, that will help me know better how to help. 😄

@ronmcca
Copy link
Author

ronmcca commented Nov 5, 2024

I got it to work with a corrected connection string. But to duplicate the error and answer your questions, I removed the database information and deleted the exported folder.
It looks like it fails on the 1st try if the connection string is wrong.

@joyfullservice
Copy link
Owner

Gotcha. So I am understanding that the goal here would be to do a better job of handling the error if the connection string is invalid or cannot connect to the database?

I am leaning towards a non-critical error if the database cannot be accessed. There might be cases where you are doing off-line development in another part of the database, and you would still like the rest of the export to complete normally, even if the remote database cannot be accessed.

@ronmcca
Copy link
Author

ronmcca commented Nov 5, 2024

It did stop the export and opened the VBA editor to the offending line which made it easy to figure out the problem. The fix I tried allowed the system to output the connection problem to message box and continued the export.

Once the remote database is exported, any future connection problem reports the error and continues the export.

@joyfullservice
Copy link
Owner

Digging into this a bit further, this is something that should be resolved through the following issue and related pull request:

@ronmcca
Copy link
Author

ronmcca commented Nov 5, 2024

So it looks like it will be fixed in a future release.

@ronmcca ronmcca closed this as completed Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants