V
Valerie Hough
I want to create a utility class which is defined as follows:
public Class MyDataReadingClass
{
....
}
In that class I want to encapsulate all the logic for performing certain SQL
Server queries and have the result set accessible from my parent, which will
always be a System.Windows.Form object.
My problem is that since my class is not derived from Control, I do not have
access to Invoke() in my async callback handler, where I would normally pass
my SqlDataReader via Invoke to a safe place from which its contents can be
accessed without synchroniziation issues.
It seems silly to be deriving my utility class from Control when it is not
really a control, but I want to be able to create instances of my data
reading utility class in different places in my applications.
Can someone please help?
Thanks in advance.
Valerie Hough
public Class MyDataReadingClass
{
....
}
In that class I want to encapsulate all the logic for performing certain SQL
Server queries and have the result set accessible from my parent, which will
always be a System.Windows.Form object.
My problem is that since my class is not derived from Control, I do not have
access to Invoke() in my async callback handler, where I would normally pass
my SqlDataReader via Invoke to a safe place from which its contents can be
accessed without synchroniziation issues.
It seems silly to be deriving my utility class from Control when it is not
really a control, but I want to be able to create instances of my data
reading utility class in different places in my applications.
Can someone please help?
Thanks in advance.
Valerie Hough