Wrox Programmer Forums
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 30th, 2004, 06:48 AM
Authorized User
 
Join Date: Aug 2003
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default Validate Event

Hi all,

I have created a form with a tab strip.

This form has a lot of controls: textbox, listboxes, checkboxes and comboboxes.

I use an ado connection to get the data from the database and initialise the form.

But what i want is to keep the data on the screen consistent with the database without a save button.

Is it a good idea to update the database on each validate event of a text box or is this too much overhead.

On the other controls i can use the click event but I do not know if this is a good way to go about this.

All suggestions are welcome.

Greetz.

Tom.
 
Old April 2nd, 2004, 08:57 PM
Registered User
 
Join Date: Apr 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Most of the impact on performance will depend on the type of DB you use (Acces vs SQL - big difference in what they can handle), and whether the app is a desktop app or multi-user. If it´s a desktop app, you can probably take the chance to update every time the user changes data. However, I would reccommend that you build a class module that can handle the data and then save it all at once to the DB (unless there's a very good reason not to do this), in any event, if you want to synchronize the data for other users to see it, it will be hard, since you would still be locking the record while writing to it, thus preventing other users from reading its updated contents. The class solution is much better, I think, since you can provide the user with a "Cancel" option in case they wish to do so, otherwise, you've already lost the original data.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Event - Sender & Event args dash dev C# 2005 9 December 9th, 2007 07:24 AM
About Button event and Keydown event zhangxujun1981 XSLT 1 March 6th, 2004 04:59 AM
Validate chekc Raul Javascript 4 February 9th, 2004 07:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.