I have a web app that I wrote about a year ago that I now need to update. Unfortunately I don’t have the original laptop that I used to develop the application on and I am having to rebuild the environment. I thought I had documented everything, but I am obviously mistaken.
Every time I run this app in debug it crashes and from what I can tell it is the SQL Server plugin that is the culprit.
I have tried using the original version that I wrote the application in (2016r1.1) as well as 2016r3 and 2016r4.1, but no luck.
The application starts and runs. It crashes after I put in the user id and password on the login page and then I click the “Login” button that then does a SELECT to make sure the user exists and the app crashed.
Anyone have any idea what I could try or what I am doing wrong?
Hi @David Cox , thanks for the reply ~ I am running it in debug mode at this point. I put a break point in the btnLogin.Action on the line before, after, and on the “rs = db.SelectSQL(strSQL)” line and it consistently crashes on this line.
As for the new MSSQL plugin actually installed I am not sure what you mean. I have tried running the project in debug with the latest version of Xojo and I get the same error. The error seems pretty consistent starting at version 2016r1.1 and on…
Hi @Jukka Leino, thanks for the reply ~ I do have the SQL Server native client installed because the database (SQL Server Express 2008R2) is installed on the same development machine.
Thanks @Greg O’Lone . Somehow one of the settings in the connection string did not save or got corrupted. Not sure how, but that was the issue. (Boy,do I feel foolish…)
Not at all… Uncaught exceptions are way better than a framework crash because it’s something that you can fix yourself. Otherwise we have to track it down and fix it for a future release. This way you’re up and running again right away.
For what it’s worth, most people don’t think about exception handling when it comes to connecting to an outside service (or server for that matter) with the expectation that it’ll always be there. Even with a database server that exists on the same exact machine, there will be times when it’s not available, most notably during backups or when a database server is being restarted after an update. It’s important to make sure that your connection code can handle such circumstances, even if you have to tell users to come back in a few minutes.