Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / November 2007

Tip: Looking for answers? Try searching our database.

Dataset,Datatable,DataColumn

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Franck - 20 Nov 2007 21:16 GMT
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
Marc Gravell - 20 Nov 2007 21:19 GMT
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
Franck - 20 Nov 2007 21:40 GMT
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.
Marc Gravell - 20 Nov 2007 21:45 GMT
> 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
Peter Bromberg [C# MVP] - 20 Nov 2007 21:35 GMT
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());
           }
       }
   }
}
Signature

--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

> I need to know what is the limit of column you can put in a datatable
> which is inside a dataset.
[quoted text clipped - 4 lines]
>
> thanks

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.