471,356 Members | 1,688 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,356 software developers and data experts.

Need a suggestion for ADO please

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.
Jul 26 '05 #1
2 1076
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
Jul 26 '05 #2
Jan
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

Jul 26 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by John Wellesz | last post: by
reply views Thread by Brian van den Broek | last post: by
48 posts views Thread by Chad Z. Hower aka Kudzu | last post: by
3 posts views Thread by Jeff | last post: by
5 posts views Thread by =?Utf-8?B?SGVyYg==?= | last post: by
6 posts views Thread by shapper | last post: by

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.