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

TypedDataSet practices

If you have a typed dataset, there is a DataTable defined for each table.

We can Fill these tables and Update them etc.

If we use the GetData() function, we get a new DataTable with the results of the
action.

Now, what I am asking is : what is the best thing (or accepted practice) to do ?
Reuse the DataTable in the DataSet, or get a new table each time ?
Aug 24 '06 #1
2 1100
Ian,

I don't see why you can't use the new table every time. It might cost
you some cycles (since you will have to remove the old typed data table from
the data set, and then add the new one).

I do believe that if you use Fill, it will fill the current table in the
data set, and clear it out, which would seem to be more efficient, IMO.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ian Semmel" <is***********@NOKUNKrocketcomp.com.auwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
If you have a typed dataset, there is a DataTable defined for each table.

We can Fill these tables and Update them etc.

If we use the GetData() function, we get a new DataTable with the results
of the action.

Now, what I am asking is : what is the best thing (or accepted practice)
to do ? Reuse the DataTable in the DataSet, or get a new table each time ?

Aug 24 '06 #2
I dunno, thinking about it and depending on the size of the dataset, a clear
might be more performant.
I only base this on the fact that in the debugger strongly typed datasets
can take ages to initialize (especially ones with 15+ tables).
Has anyone ever done any benchmarks on this?

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:eG****************@TK2MSFTNGP04.phx.gbl...
Ian,

I don't see why you can't use the new table every time. It might cost
you some cycles (since you will have to remove the old typed data table
from
the data set, and then add the new one).

I do believe that if you use Fill, it will fill the current table in
the
data set, and clear it out, which would seem to be more efficient, IMO.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ian Semmel" <is***********@NOKUNKrocketcomp.com.auwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
If you have a typed dataset, there is a DataTable defined for each
table.

We can Fill these tables and Update them etc.

If we use the GetData() function, we get a new DataTable with the
results
of the action.

Now, what I am asking is : what is the best thing (or accepted practice)
to do ? Reuse the DataTable in the DataSet, or get a new table each time
?
>

Aug 24 '06 #3

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

Similar topics

2
by: byrocat | last post by:
I'm chasing after a documetn that was available on one of the Microsoft websites that was titled somethign like "MS SQL Server Best Practices" and detailed a nyumber of best practices about...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
13
by: john doe | last post by:
A quick question, about so-called 'best practices', I'm interested in which of A/B of the two examples people would choose, and why. public enum MyEnum { Option1 = 0, Option2 = 1, Option3 =...
2
by: Amelyan | last post by:
Could anyone recommend a book (or a web site) that defines best practices in ASP.NET application development? E.g. 1) Precede your control id's with type of control btnSubmit, txtName, etc. 2)...
10
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read...
2
by: js | last post by:
I got this error when I moved my application to a new Windows 2003 server. I installed and recompiled the 'Microsoft.Practices.EnterpriseLibrary - June 2005" then added these assemblies to the...
4
by: liming | last post by:
Hi, I know it's possible to have transactions with Typed DataSet, but I have yet to find an example of it. For example, I have two typed TableAdapter CommerceDataSet.xsd ...
0
by: job | last post by:
Mohamed Sharaf's has produced a Microsoft.Practices.EnterpriseLibrary production server installer: https://blogs.msdn.com/mohamed_sharafs_blog/archive/2005/09/18/470854.aspx Running the...
1
by: orenl | last post by:
Hi, Im using the VisualStudio 2005 designer to create typedDataSet (drag & drop from the service explorer). All the DataTables in the generated code inherit from System.Data.DataTable, I would...
5
by: =?Utf-8?B?TWljaGFlbFF1aW5sYW4=?= | last post by:
In my development environment I can add references to the Microsoft Practices libraries and everything works ok. But when I copy the application to the test server I get the message "CS0234: The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.