Solved

When to use what...???

Posted on 2008-10-02
4
155 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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTML - Color not displaying correctly in EMAIL. 6 54
Sending receiving text messages in vb.net 15 62
Error message when using PrintSocket.Send 7 26
ModalPopup  question 22 38
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

756 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