Need a suggestion for ADO please

  • Thread starter Thread starter Cor Ligthert [MVP]
  • Start date Start date
C

Cor Ligthert [MVP]

Tom,
Does controls' data binding is a better way?

Normally Yes.

It is to much to explain all of course. However, know that there are

Simple controls, for which you use
Textbox1.DataBindings.Add("Text", MyDataTable,"MyDataColumn")
'where "Text" is the normal property from the textbox and can be any
property of that while you can add as well (more) other properties of that

Complex dataControls as the datagrid that have a "datasource" for which it
is very easy
Mydatagrid.DataSource = MyDataTable

Complex normal controls as the listview, for which you will normally have to
build your own extra classes to databind.

(For C# you have to set a ";" after the samples above).

I hope this gives an idea

Cor
 
Hello All!

I use visual basic .net 2003 and develop database application based on MS
ACCESS.
Since I started develop my application till now I use the same way to handle
the data flow:
1. I create a dataset that contains no records (by SQL select statement that
brings no records).
2. I create new record/s by the .NewRow method of the dataset object and
fill the key field/s with values.
3. I fill-in the rest of the fields by the datarow("field_name")=... method
of the dataset.
4. I save the changes to the database by the .update method of the
dataadapter.

First, I know that I probably use long and inefficient way to handle the
data, and that's why I want to change it...
Can someone suggest me a different way to handle data issues?
Does controls' data binding is a better way?
Any other idea?

Thanks!
Tom Rahav.
 
Hey Tom,

Try opening the Server Explorer and dragging a table out of your Access
DB onto the design surface, This will automaticlly create:

A strongly typed DataSet
A configured DataAdapter
and a connention to your database.

It should speed things along for you

Jan
 
Back
Top