Where to start?

  • Thread starter Thread starter cartoper
  • Start date Start date
C

cartoper

* Plateform: .Net 2.0

* Question:
Is ado.net the solution? If so, what should I be looking into?

* Data:
schedule containing:
1 to n properties
collection of lines

line containing:
1 to n properties

* Data Source:
An engine that needs to take the saving of the data to keep a version
history. The design is complete for how the versioning will be kept;
it is based on doing a difference of what is saved and what is in
memory.

* Problem
How to display this data and allow the user to make changes to it.

* My thoughts
I have limited knowledge of ado.net, but I am guessing that it is
pretty straight forward to display the collection of lines, or a
DataSet table of lines, in a datagrid. What I don't understand is
how best to couple the data in the engine with a dataset. Do I simply
create a DataSet (one of those .xsd files) and create a table for the
collection of lines, have the engine populate it and have the GUI send
it back to the engine for saving? Or is there a more sophisticated way
of creating my own DataSet? Are there other ado.net classes I should
be learning about to make the engine a sort of provider for then GUI?
 
* Plateform: .Net 2.0

* Question:
Is ado.net the solution?
--There could be many, but ADO.NET will definitely do the job well.
If so, what should I be looking into?
DataSet/DataTable, DataGrid, BindingContext/BindingManagerBase, DataAdapter
* Data:
schedule containing:
1 to n properties
collection of lines

line containing:
1 to n properties

* Data Source:
An engine that needs to take the saving of the data to keep a version
history. The design is complete for how the versioning will be kept;
it is based on doing a difference of what is saved and what is in
memory.

* Problem
How to display this data and allow the user to make changes to it.

* My thoughts
I have limited knowledge of ado.net, but I am guessing that it is
pretty straight forward to display the collection of lines, or a
DataSet table of lines, in a datagrid. What I don't understand is
how best to couple the data in the engine with a dataset. Do I simply
create a DataSet (one of those .xsd files) and create a table for the
collection of lines, have the engine populate it and have the GUI send
it back to the engine for saving?
--That will work. Once you have a dataSet, you can provide it to the user
to view and edit by simply setting the dataSource property of the datagrid.
When they are done, they can just hit an Update button which will take the
chnages and send them back to the db by simply calling
DataAdapterName.Update(DataTable);
Or is there a more sophisticated way
of creating my own DataSet? Are there other ado.net classes I should
be learning about to make the engine a sort of provider for then GUI?
--See above in beginning comments
 
Cartoper,

Microsoft has it again made not easier to explain things.

There are now 2 meanings for the word datasource

One as it has always been a property in a complex datacontrol to bind your
datasource (dataset, datatable, or another bindable object)

The other is a component from which you can drag from the box Data Sources
tables on your form.
It creates than a DataGridView, BindingSource and a BindingNavigator

As I have seen do most of us here active not like all those components. They
give the posibility for RAD but have a very quick end if you want to do
more.

If I see your current problem than you can do it in probably less than ten
clicks.

Open a form
Go to the tab in top Data, follow the wizard by creating first a new
connection. Be aware that it sometimes takes some time to get new
information, therefore don't cancel to quick and do all steps.
If this is done go again to the tab Data. Click on Datasources and drag the
by you with the previous steps created table in that on your form.

Your program which can get information line by line and update it is ready.

Be aware that there is absolutely nothing done for by instance error
handling as concurrency errors.

I hope this helps,

Cor
 
Back
Top