Where exactly in code are you creating the MyConnection connection object?

Could you show a little more of your code?