Hi all,
I have a question/problem concerning usage of my sqlconnection throughout my
program.
In my main form (frmMain) I defined an sqlconnection (I've set the
connection public so that I can open & close the connection from everywhere
in my app).
My main form is an mdi parent which contains several mdi-childs.
To open and close the sqlconnection in an mdi-child i use the following:
((frmMain)this.mdiparent).sqlconnection.open();
((frmMain)this.mdiparent).sqlconnection.close();
But this works for an mdi-child. Now I want to use this sqlconnection within
a form that I show as modal, let me explain this a bit further:
I have an mdi-child open, from there I want to open a small form (by
..ShowModal()) and in that form I must open and close the sqlconnection to
save my in that form edited data.
Can somebody help me how to address my sqlconnection from my frmMain in this
form that is showed modal?
Thank you for helping me out.
Kind regards,
Tom.