Solved

When to use what...???

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

770 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