If you are looking for code, here is what I use:
public static DataSet GetDataSet(string tcSQL, string tcTableName, SqlConnection toConnection)
{
DataSet loDataSet = new DataSet();
SqlDataAdapter loSqlDataAdapter = new SqlDataAdapter(tcSQL,toConnection);
loSqlDataAdapter.Fill(loDataSet, tcTableName);
return loDataSet;
}
>Hi,
>
>I have created a class that returns an active connection to the database.
>
>Using this connection, I want to create a class that can be used to return data from the database.
>The ideal situation is for all programmers in our company to use this generic class, passing in an active connection as well as table names so that the class would return a dataset.
>
>Does that make sense?
>
>I need some advice, hints...
>
>Thanks,
>Alvin
- Jayesh