473,383 Members | 1,874 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,383 software developers and data experts.

DataSet frustration

I am currently working on a program that will connect to a MySQL server, and
manipulate data in a datagrid. However, I'm having trouble understanding a
lot of the process. I need help understanding DataSets in a context I can
follow. I have tried to piece together how they work by going over MSDN
definitions/examples and by looking it up in my Visual C# .NET Step by Step
book... neither is clicking with me.

I need a broad paint stroke on how DataSets, DataTables, DataViews all fit
together. Any information would be appreciated.

Have I missed a section that was vital to understanding DataSets?

Thank you for your time.
Nov 17 '05 #1
2 1606
A DataSet is a collection of DataTable's
A DataTable is basically a matrix of rows and columns with data - a lot like
a database table.
A DataView allows you to have a filtered and/or sorted view of the data in a
particular DataTable.

"BlackHat" <Bl******@discussions.microsoft.com> wrote in message
news:61**********************************@microsof t.com...
I am currently working on a program that will connect to a MySQL server,
and
manipulate data in a datagrid. However, I'm having trouble understanding
a
lot of the process. I need help understanding DataSets in a context I can
follow. I have tried to piece together how they work by going over MSDN
definitions/examples and by looking it up in my Visual C# .NET Step by
Step
book... neither is clicking with me.

I need a broad paint stroke on how DataSets, DataTables, DataViews all fit
together. Any information would be appreciated.

Have I missed a section that was vital to understanding DataSets?

Thank you for your time.

Nov 17 '05 #2
If you are coming from pre .net programming or another language
altogether, the most basic thing to understand is that a dataset is not
a connected set of records, it's an in-memory set of tables. The tables
are also in-memory. So all changes you make must be saved back to the
server with update/insert/delete statements.

The basic working mode is:
You need a connection object. (Oledbconnection)
You need an adaptor object (Oledbadaptor).
Your adaptor needs Select/Insert/Update/Delete statements. (Just the
ones you need, all are not necessary.) These can be in the adaptor
properties or seperate items.

You then use a "Fill" command on the adaptor to fill one or more tables
in the dataset.

A good book is a must to learn this. I like Francisco Balena's books,
but they're mostly VB.net.

I guess it's too ambitious to answer this question briefly, hope it
helped a little.

Bob Graham

BlackHat wrote:
I am currently working on a program that will connect to a MySQL server, and
manipulate data in a datagrid. However, I'm having trouble understanding a
lot of the process. I need help understanding DataSets in a context I can
follow. I have tried to piece together how they work by going over MSDN
definitions/examples and by looking it up in my Visual C# .NET Step by Step
book... neither is clicking with me.

I need a broad paint stroke on how DataSets, DataTables, DataViews all fit
together. Any information would be appreciated.

Have I missed a section that was vital to understanding DataSets?

Thank you for your time.


Nov 17 '05 #3

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

Similar topics

10
by: Frog | last post by:
Hi, i'm not a programmer so I have a very stupid question. I'm trying to make a practical script. I need to run an executable program in it but i can't get it to work. Maybe someone here can...
8
by: Bruce Stockwell | last post by:
the setup: Webservice/WinClient application/SQL server. VS.Net (visual basic) winform wizard creates a simple form with load cancel cancelall and datagrid bound to a simple Dataset with one...
40
by: Peter Row | last post by:
Hi all, Here is my problem: I have a SQL Server 2000 DB with various NVarChar, NText fields in its tables. For some stupid reason the data was inserted into these fields in UTF8 encoding. ...
5
by: Mike | last post by:
I need to expand the DataSet class by inheriting from it and adding functions that work on the data in the tables. However, since I can't upcast how can I get my base DataSet object assigned an...
2
by: John Holmes | last post by:
I have a web interface where the user types in ID's one at a time. After an ID is typed in, a button is clicked and the button click event has code that does a query and returns a data reader and...
3
by: anand | last post by:
hi, let: dataSet1 is having some data from database. dataView1 = dataSet1.table(0).defaultView dataGrid1.dataSource = dataView1 dataGrid1.TableStyle.add(myTableStyle1)
13
by: processoriented | last post by:
I am trying to find the best approach to do something here... situation is this... One of the tables in my dataset is a "Work Order" table with information about what needs to be done and where. ...
0
by: U.C. | last post by:
Hello All, I am a new user with V.S. 2005 and very frustrated with the Dataset Designer Microsoft added and the Component Designer from V.S. 2003 that Microsoft nuked. After falling in love...
11
by: Lloyd Sheen | last post by:
Why oh why can I not edit and continue??? VS 2005 Pro. Multi project solution. All solutions set to debug. But I cannot edit the source when debugging. Any ideas??
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.