DataSet frustration

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top