Solved

When to use what...???

Posted on 2008-10-02
4
152 Views
Last Modified: 2010-04-23
Hi, I'm using VB 2005, WinForms. I have a general quesiton regarding data-sources.

VB.NET offers different options in terms of data-sources such as DataSets, DataTables, DataViews, etc. When should each be used? In other words, why use a DataTable vs. a DataSet, or a DataView vs. a DataTable?

Also, is any one data-source more "flexible" or advantageous in any way in terms of use vs. any of the others?

Thanks for your guidance...
Fulano
0
Comment
Question by:Mr_Fulano
4 Comments
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 100 total points
ID: 22629412
short explanation:
datatable just has 1 table, while dataset can have many
dataview allow you to have a filter that you can change on the fly.
0
 
LVL 48

Assisted Solution

by:jpaulino
jpaulino earned 100 total points
ID: 22629731
When to use what...???
 If you read information from a database, you can store that on a dataset and then use it. You can then use a dataview to filter information.
You can use also datatables but has only one table but, in the other side, is very flexible to work with xml.
It depends of what you need!  
 
0
 
LVL 12

Accepted Solution

by:
rionroc earned 300 total points
ID: 22632938
Hello


Use DataTable instead of DataSet.

DataTable uses less memory than DataSet.
DataTable is faster than DataSet.
DataTable is simple than using DataSet.
Use DataSet if you have a huge collection of tables.


eq.
Dim da As xSqlDataAdapter
Dim dt As New DataTable
da = New xSqlDataAdapter("select * from xtable", xsqlconn)
da.Fill(dt)


Great is our GOD.
:)
0
 

Author Comment

by:Mr_Fulano
ID: 22639783
Thank you for all your contributions. I think you all offered very good opinions and advice. Thanks for your help and I think a 3 way split is equitable.

Fulano
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now