Your question not clear. You can have this code wherever you need to access data. Remember to close the connection which you opened.
To get dataset from the adapter you can use the data adapter's
Fill
method which has four overloaded options.
DataSet ds = new DataSet("Test");
oleDA.Fill(ds);
Now the question is Preserve these objects or not. I think that is the 'Where' part of your question. Well it depends on necessity. Adapter and the connection string you could keep global scope. But in view of dataset, If many places you need to use this then you can store dataset in a form's global variable otherwise no need to preserve. But open the connection whenever need and close it after used.
As a general rule, bring all the
required data from the database to the memory, then use business logic to access specific data. Keep in mind there should be a balance.