PC Review


Reply
Thread Tools Rate Thread

Dataset,Datatable,DataColumn

 
 
Franck
Guest
Posts: n/a
 
      20th Nov 2007
I need to know what is the limit of column you can put in a datatable
which is inside a dataset.
i search on MSDN but i was only able to find the maximum amount of
rows which is 16millions something. Column must have a limit also i
guess. what it is. because i have dynamic column builder and i wonder
if it would eventually crash.

thanks
 
Reply With Quote
 
 
 
 
Marc Gravell
Guest
Posts: n/a
 
      20th Nov 2007
I'd be more worried about the the overall system design than the
column limit... it'll probably happily manage any sensible scenario
you throw at it (I have seen people perform a row/column transform
using dynamic columns), but you might get some minor performance
issues (resolving columns by name, in a tight loop, for example) as it
gets very wide.

Marc

 
Reply With Quote
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      20th Nov 2007
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
DataTable dt = new DataTable();
for (int i = 0; i < 100000000; i++)
{
dt.Columns.Add(i.ToString());
if (i % 10000 == 0)
Console.WriteLine(i.ToString());
}
}
}
}
--
--Have fun, Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com



"Franck" wrote:

> I need to know what is the limit of column you can put in a datatable
> which is inside a dataset.
> i search on MSDN but i was only able to find the maximum amount of
> rows which is 16millions something. Column must have a limit also i
> guess. what it is. because i have dynamic column builder and i wonder
> if it would eventually crash.
>
> thanks
>

 
Reply With Quote
 
Franck
Guest
Posts: n/a
 
      20th Nov 2007
performance doesn't matter it's going to be binded to a crystal
report. the column display between 100 and 5000 different value which
give plus or less 50 pages and under that there can be unknown number
of record but it's not going to go over 1 million that i am sure off.
it may be more than 5000 column that's the thing, it can get up to
20000 i don't know it's dynamic. so i needed to know if it will handle
all that. To fill my datatable i already call hundred of sql query to
fill it up and Dll calling also so like i said performance isn't
issue, working or not it is.
 
Reply With Quote
 
Marc Gravell
Guest
Posts: n/a
 
      20th Nov 2007
> it can get up to 20000
Well, Peter's test-rig happily made it to 2M on my lowly setup before
I got bored, so it sounds like you're all set, then ;-p

Best of luck,

Marc
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Delete Datacolumn of a Datatable aaapaul Microsoft ADO .NET 0 5th Jul 2007 12:08 PM
Any trick to get this to work in DataColumn of DataTable? =?Utf-8?B?TXJOb2JvZHk=?= Microsoft C# .NET 1 12th Dec 2004 04:52 AM
Adding datacolumn to filled datatable VMI Microsoft C# .NET 1 2nd Nov 2004 08:20 PM
Reverse DataColumn order in a DataTable Lebrun Thomas Microsoft Dot NET Framework 2 8th Aug 2004 07:35 AM
Extra DataColumn's in DataTable Faz Microsoft ADO .NET 2 19th Nov 2003 06:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:58 AM.