The entire set is loaded into memory on the machine using the DataSet. It is
pulled as XML. For huge recordsets, you may notice it taking awhile. I
cannot comment on 100,000 records, as I do not know the column lengths. It
could be slow.
The ADO.NET model allows you to create a new Table programatically.
1. Create a DataTable object
DataTable dt = new DataTable();
2. Create columns for the data table
DataColumn dc = new DataColumn("ColumnName");
dt.Columns.Add(dc);
3. Create a new row and fill each column
DataRow dr = new DataRow();
dr["ColumnName"] = "some value";
dt.Rows.Add(dr);
4. Repeat step three until you have all rows filled
dr = new DataRow();
dr["ColumnName"] = "some other value";
dt.Rows.Add(dr);
5. Add DataTable to DataSet
ds.Tables.Add(dt);
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************
Think Outside the Box!
************************************************
"Mojtaba Faridzad" <mf*******@hotmail.com> wrote in message
news:ek**************@TK2MSFTNGP10.phx.gbl...
Hi,
I am a newbie! I am wondering how DataSet keeps the data. I am using MySQL
as database engine. when I use "Fill" method to set a table in DataSet,
does C# retreive all data (base on Select statement) to the local computer's
memory? if we retreive 100,000 records, does it take a while to load
them?
another question that I am not sure about it. can we create a table in
DataSet without relation to MySQL database? I'd like to create a
temporary table on a local computer's memory (not on the server). is that possible?
how?
thanks in advance