column limit in a data set

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

So someone mentioned that there is a column limit in the .Net framework when
you are working w/ datasets. Now I'm pretty sure that my data sets will have
less than 400 columns, but it will proabably be more than 256 columns. So I'm
crossing one of the magical computer boundaries.

Can someone tell me if this is really an issue, and if this is on thier
radar to fix ?
 
Bas,

I never heard of such a limit. It's easy enough to test on your own
though. I'll give you a hint, the answer is no (at least in .NET 2.0, and I
can't see anything in previous versions either).

I'll give you a hint though, neither of those value are limits. I've
been able to add 1000 columns to a data table just fine.

Hope this helps.
 
well ... it seems to do well enough with 10000 columns added to it ;-)

*********************
[STAThread]
static void Main(string[] args)
{
DataSet ds = new DataSet();
DataTable tbl = new DataTable();
ds.Tables.Add(tbl);

int i=0;
try
{
for (i=0;i<10000;i++)
{
tbl.Columns.Add(
new DataColumn(i.ToString(),
typeof(int)));
}
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}

Console.WriteLine("{0} columns added", i);
Console.ReadLine();
}
*******************

Hope that helps,
Joel Martinez
http://www.onetug.org - Orlando .NET User Group
http://www.codecube.net - Blog
 
Back
Top