Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

When to use what...???

Posted on 2008-10-02
4
Medium Priority
?
160 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 300 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 300 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 900 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

721 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