Web app crashes using MSSQLServer Plugin

Hello All,

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?

Can you run it in debug mode and see which line it is crashing on? Is the new MSSQL plugin actually installed?


This happens to me when I use prepared statements with MSSQLServer plugin.
It works if I change those to Database.SQLSelect…

Btw. You have Microsoft SQL Server Native Client installed?


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.

This is propably just typo: SelectSQL = SQLSelect…

@Jukka Leino ~ Doh! Yes, I was “multi-tasking”…which I am not very good at it. Yes, you are correct.

So is anyone else seeing this? Resolved it?

So are you actually crashing or is it simply an exception that you’re not catching?

Maybe db is Nil?

Hi @Greg O’Lone I don’t have access to the environment right now. I will check this evening and let you know.
Thanks for the reply! :slight_smile:

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. :slight_smile:

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.