AccessProviderSample.AccessDBProvider.GetDataSetForTable C# (CSharp) Method

GetDataSetForTable() private method

Gets the DataSet (in memory representation) for the table for the specified adapter
private GetDataSetForTable ( System.Data.Odbc.OdbcDataAdapter adapter, string tableName ) : DataSet
adapter System.Data.Odbc.OdbcDataAdapter Adapter to be used for obtaining /// the table
tableName string Name of the table for which a /// DataSet is required
return System.Data.DataSet
        internal DataSet GetDataSetForTable(OdbcDataAdapter adapter, string tableName)
        {
            Debug.Assert(adapter != null);

            // Create a dataset object which will provide an in-memory
            // representation of the data being worked upon in the
            // data source.
            DataSet ds = new DataSet();

            // Create a table named "Table" which will contain the same
            // schema as in the data source.
            //adapter.FillSchema(ds, SchemaType.Source);
            adapter.Fill(ds, tableName);
            ds.Locale = CultureInfo.InvariantCulture;

            return ds;
        }