Query Method in Database Class
I am writting a database wrapper class (Heres most of the class) I have the db_open, db_state and db_close methods working properly...but now I want to create a db_query and a db_execute methods. I want the db_query to take 2 parameters, the first being a string (possible sql statement or stored procedure name) and the 2nd is a boolean value as to whether or not the first parameter is a stored procedure. But I am somewhat confused as to how to return the data?? I don't want to used a Dataset, because I don't want the recordset to be disconnected, so it is down to either a DataAdapter or a DataReader...obviously just to query (SELECT) records from the database the DataReader would be fine, but how to return the data to the user via a method call???
I have seen methods like this
Code:
public Dataset blah(string blah)
but haven't seen anything regarding how to do it with a DataAdapter or DataReader.
Thanks!