
Should I use data control or not?
Hi there Terrel.
The problem with using the data control is that it all too often puts the
database in states that you really don't want. For example, if a user
starts to edit some bound controls on a form then what they are actually
doing is locking a portion of the table that the datacontrol is connected
to.
You never know at any point in time whether the data control is adding a
record, browsing, or just editing something that already exists, and this
means that you need to write code to find these things out and
effectively fight what the data control is naturally doing.
If you dump the control though and just do all your database access
through straight code, then you are aboslutely sure that nothing else is
messing with your database session. Users can update fields on screen and
you don't have to worry about those changes filtering their way into your
tables until they run your code that explicity does this (like when they
click on an OK button for example).
The other big big advantage is that everything is a whole lot quicker and
slicker if you don't use the data control. The control is just adding
another layer of code onto of something that is already quite heavy and
slow. By doing everything in code you work around this extra baggage and
realise some nice speed gains.
Hope this helps,
Peter.
says...
Quote:
> Hey Group,
> I have read that using the data control on my forms on a major application
> may not be wise. Is this true? What are the advantages of writing my own
> data control and does anyone have any code snippets?