Hi, 

HouseDad wrote:
> 
>      You helped me solve a problem.  Thank you.  I am curious 
> about these statements you made:
>  
> > Stay away from bound controls.
> 
>      Is this the same as the textbox property having the 
> control and file properties set?  Using the DATA1 control?
> 
> >  You will find it easier to switch to using arrays later, 
> if you use 
> > unbound controls.
> 
>      By this do you mean storing input in an array, then just 
> writing the data from the array to the database directly 
> instead of it happening automatically because the textbox 
> controls are "bound" to the database?

What Jimbobob was talking about and my reply to him was about storing the
contents of a whole table (or a big chunk) in an array.  This is not what is
usually meant by using unbound controls.

Yes, when you set the DataSource property of a TextBox, you are using a
bound control.

A common unbound approach, for applications that typically have only one
record (or a small number of related records) open at a time, is for the
form to store the values for all of the visible fields in a member variable
of type "Recordset"

The recordset, might have been fetched using either DAO or ADO (or perhaps
even some other third party DB library).

>From this point on, there are some variations in technique.  The recordset
may or may not be read-only.

In one approach (pessimistic locking), an attempt is made to put the current
record into an "Edit" state as soon as the user starts typing on the form.
This means that the record is not locked until they start typing, and you
have a chance to handle the situation where the record is locked by another
user.  (This is called pessimistic locking).

In another approach (optimistic locking) no attempt is made to update the
database until the user has hit "Save" or moved on to the next record.  At
that point, the database is updated.  The application may be overwriting
changes made by another user (during the time between the first user opening
the record and hitting save).  Extra checks have to be written in to detect
this situation and deal with it.

> 
> >  (It is possible to write your
> > own binding layer but that's a rather code-heavy approach).
> 
>     I use a for/next loop to assign the database field 
> equivalent to the textbox fields on my form.  This is what I 
> think of when you talk about a binding layer, which can't 
> possibly be right.  

I am confused by this statement.  I can't tell from this whether you are
using unbound controls or not.

When I say that it is possible o write your own binding layer, I mean that
it is possible to write your own custom control that replaces the Data1
control.

Adelle.



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/k7folB/TM
--------------------------------------------------------------------~-> 


'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [EMAIL PROTECTED]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vbhelp/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to