Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Binding vrs Unbound Controls best approach?

Status
Not open for further replies.

aolb

Programmer
Apr 16, 2002
180
GB
I am very new to vb.net and I want to start down the right path. In the past when I have built applications in VBA I always used unbound controls. Should I use this approach with vb.net or should I go with data binding the controls?
 
unbound, for me

Christiaan Baes
Belgium

I just like this --> [Wiggle] [Wiggle]
 
Same here - I think you learn more by using unbound controls as you have to understand the code in order to show/edit/update the data, but that doesn't mean bound controls are bad - it's just personal preference.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
One of my considerations with bound verses unbound was to do with record locks. Is there any advantages in bound controls with regards to record locks?
 
ADO.Net doesn't lock records. It is entirely disconnected. What it will do for you is throw an exception if you are trying to update a database and the underlieing records have changed.

If you want to do active record locking, going unbound and developing your own data layer would be your best bet.

Set up a base data object that handles all of the data interaction. It will handle your locking, then inherit from it for each of your data entities (tables, views, queries, etc). You can use some abstraction to create a great framework so that you only need to write highly specific code in each of your data entity classes. And after you get the structure finalized, you can throw together a class builder to write your code for you.

-Rick

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
i use non-updateable bound controls with ado.net for selecting key values or options that change very little. Every data entry that the user can hurt should use unbound controls. Your own validation is always going to be best.
Steve
 
Thanks for all your help, unbound it is.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top