Hi five
Firstly, apologies for not responding sooner.
Yes, the Connected property is set to false and all the connection parameter values are assigned in OnShow. The odd thing is that setting the Connected property to true and retrieving data from the database works fine. The problem arises when setting it to false at the end (it really baffles me).
No, I don't have the Try Except End to handle setting the Connected property to false, so the application should fail in runtime but it doesn't. However, your question triggered me to use it to see if I might get a clearer error message but that didn't work as this is a memory access error, i.e. the same error comes up.