473,395 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Dataset,Datatable,DataColumn

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
Nov 20 '07 #1
4 2008
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

Nov 20 '07 #2
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
Nov 20 '07 #3
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.
Nov 20 '07 #4
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
Nov 20 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Holmes | last post by:
I have a web interface where the user types in ID's one at a time. After an ID is typed in, a button is clicked and the button click event has code that does a query and returns a data reader and...
4
by: hs | last post by:
Hi I am serializing a dataset using a binary formatter as follows: IFormatter formater = new BinaryFormatter(); formatter.Serialize(stream, ds); // ds=DataSet, stream=MemoryStream .... DataSet...
35
by: MuZZy | last post by:
Hi All, I got a issue here and hope someone can help me: Let's consider this code: // =================== CODE START ================================= using System; using System.Data; ...
0
by: Nauman Ahmed | last post by:
Hi, I need to populate and merge DataSet to make an XML in the following format: <?xml version="1.0" standalone="yes"?> <CompanyOrders> <CompanyProfile> <CompanyID>Test</CompanyID>...
0
by: Dave | last post by:
Tried posting in the Winform Forum without much luck, so posting here... After inserting a new data row to a DataTable that is bound to a datagrid, I am unable to change data in a row that is...
5
by: Roy Lawson | last post by:
I am having no problems connecting to a DB, creating a DataAdapter, and creating a dataset...and connecting to the data. Using the builtin data objects to do all this. My only problem now is...
10
by: dauphian | last post by:
Hello, I am new to .net and am trying to build a report application that queries 4 different tables based on a id, and I need to return them in the same table for easy viewing. Basically, I...
3
by: ASPnewb1 | last post by:
I am currently filling a dataTable then adding this table to a dataset, setting the dataset to the Gridview's datasource. If I set the Gridview to generate columns automatically it will fill the...
12
by: Andy B | last post by:
I need to custom build and use a dataset in c# to use with xml. Does anybody know where I can find out how to do something like this? I was going to create a class that generated the dataset and...
3
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.