I've been creating and managing database connections in forms using drag and drop items to this point.
What I want to know is what do I need to achieve this outside a form, say a class. For instance in my class, I import the dataset from the main form. Then I assign these imported datasets to 'invisible' listboxes, and specify the display members. I've had no problems obtaining a value using FindStringExact, but apparently any attempt to access the listboxes via methods such as SetIndex result in null reference exception, almost as if the items aren't being filled into the listboxes.
What then do I need to remedy this or at least manually set up a db connection? Do I need an oledbconnection object? A dataadapter? New datasets? If so, how do I go about doing this?
What I want to know is what do I need to achieve this outside a form, say a class. For instance in my class, I import the dataset from the main form. Then I assign these imported datasets to 'invisible' listboxes, and specify the display members. I've had no problems obtaining a value using FindStringExact, but apparently any attempt to access the listboxes via methods such as SetIndex result in null reference exception, almost as if the items aren't being filled into the listboxes.
What then do I need to remedy this or at least manually set up a db connection? Do I need an oledbconnection object? A dataadapter? New datasets? If so, how do I go about doing this?