473,395 Members | 1,558 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.

Fastest way to load data

I have to call a stored procedure which returns about 1000 rows with
about 5 fields (most of them are int).

What is the fastest way to load this data?

if I just do DataTable.Load, then is it fast? or should I do something
else?

Thanks

Feb 12 '07 #1
3 3459
You can either get a DataReader or a DataSet. DataReader keeps the open
connection and is "Firehose" style one way access through your data. If you
need to be able to work with the data after closing the connection, then you
need to get a DataSet. DataSet has more overhead, but with only 1000 rows and
5 columns, you would never be able to notice the difference. Check out the
QUICKSTARTS samples for example code.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Sehboo" wrote:
I have to call a stored procedure which returns about 1000 rows with
about 5 fields (most of them are int).

What is the fastest way to load this data?

if I just do DataTable.Load, then is it fast? or should I do something
else?

Thanks

Feb 12 '07 #2
P.S. DataTable Load method uses a supplied DataReader "under the hood".
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Sehboo" wrote:
I have to call a stored procedure which returns about 1000 rows with
about 5 fields (most of them are int).

What is the fastest way to load this data?

if I just do DataTable.Load, then is it fast? or should I do something
else?

Thanks

Feb 12 '07 #3

I would just use BULK INSERT

ADO.net doesn't have _HALF_ of the performance / functionality as ADO
Classic

On Feb 12, 1:22 pm, "Sehboo" <MasoodAd...@gmail.comwrote:
I have to call a stored procedure which returns about 1000 rows with
about 5 fields (most of them are int).

What is the fastest way to load this data?

if I just do DataTable.Load, then is it fast? or should I do something
else?

Thanks

Feb 14 '07 #4

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

Similar topics

11
by: DraguVaso | last post by:
Hi, I should use XML to synchronize the data from different (VB.NET) applications, and I was just wondering which Overloads of these functions ( ReadXmlSchema, ReadXml and WriteXml) goes the...
4
by: laurenq uantrell | last post by:
I am trying to determine which of three stored procedure designs are fastest in the Query Analyzer: One query is a straight SELECT query with all desired rows and a dozen (tblName.RowName =...
0
by: chad kline | last post by:
i have searched around for an answer to this question, but haven't found a satisfactory answer. i understand things like mmap(2) can be used to quickly load a file - but it seems to be a...
11
by: Ignacio X. Domínguez | last post by:
Hi. I'm developing a desktop application that needs to store some data in a local file. Let's say for example that I want to have an address book with names and phone numbers in a file. I would...
60
by: Julie | last post by:
What is the *fastest* way in .NET to search large on-disk text files (100+ MB) for a given string. The files are unindexed and unsorted, and for the purposes of my immediate requirements, can't...
1
by: TKapler | last post by:
I got a javasscript based aplication, which is working with data from server (php&sql, changed once per week or so). Actualy I use a xml as a data format with structure e.g. I open read the file...
4
by: Jörgen Ahrens | last post by:
Hi All VS 2005 SP1 (C#, VB.NET) I need the absolut fastest way of loading an xml-file of about 700KB into an array. I need to load about 1500 of those xml-Files into arrays on startup of my...
3
by: Code Monkey | last post by:
DataTable loading a SqlDataReader (dt.Load())? Vanilla DataTable using SqlDataAdapter or SqlDataReader ? or is there a better way using Generics? If so, how? Essentially I want to get about...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.