OldManStarting 0 Newbie Poster

Hi;

I have a question regarding my curent use of datasets and classes.

I currently have a class with public properties of
connectionstring
sqlcommand

Im setting the 2 properties from my main form and then calling a public sub within the class, this sub reads the connectionstring, connects to my sql express server and performs the sqlcommand.

Currently im using it to create a dataset of the items in the table being queried.
However this dataset is only avaliable within the class so im having to start to do form coding within the calss otherwise i cannot make use of the dataset information.

Is there anyway to create the dataset within the calss so that it can be accessed from the calling form?

Or perhaps i should not be using a class for this?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.