
TTempDetailTable component for Borland Delphi

It would be nice if you could modify several detail records in a DBGrid in a
one-to-many situation and then say, whoops, let me change all that back. 
Well, here's the component for you.

$ 20, trial run (can only run while Delphi is running), from OnTYme Software.

TTempDetailTable is a descendant from TDataSet that is *specifically* designed
for dealing with one-to-many TTable setups in Delphi when using local Paradox
or dBase tables. This is how it works:

There is only one pertinent property in the component and that is the 
SourceTable (type TTable) property that points to another TTable on the same
form.  You must fill in this property or you will get an exception when you
try to make the TTempDetailTable component active (open it).  Also, the 
TTable that SourceTable points to must have its MasterSource and MasterFields
properties established or you will again get an exception when you try to make
the TTempDetailComponent active.  The TTempDetailTable component relies
heavily upon these two properties in the source table to do its work.

After setting the SourceTable property and making sure that the MasterSource
and MasterFields properties are set in the source table, you're all done !
That's it !

Basically the TTempDetailTable component acts as a shadow dataset to its
source table, updating itself when the source's master table changes and
posting itself to the source when the source's master table is posted.  As
some extras, though, the TTempDetailTable component also:

Resyncs it's key fields with the master key fields whenever any of the master
key fields change.

Automatically puts the master TTable into edit mode whenever the 
TTempDetailTable is changed, either an insert, edit, or delete occurs.  This
makes sure that you always get a lock on the master record before being
able to modify any of the detail records.

Contains all of the events and properties for exception handling found in
my other freeware component TErrorTable.

Up to now everything seems great, now here's the bad news:

******************************************************************************

You need the VCL source to use this component at all. (Yuk !)  It uses BDE
temporary tables for the buffering but the VCL has a little glitch in it 
where it will not let you edit a temporary table.  The VCL source code can be
patched, though, and this is how you do it:

At Line # 2281 in DB.PAS

Change this:

  FCanModify := (CursorProps.eOpenMode = dbiReadWrite) and
    not CursorProps.bTempTable;

To this:

  FCanModify := (CursorProps.eOpenMode = dbiReadWrite); { and
    not CursorProps.bTempTable; }

Then copy DB.PAS into the \DELPHI\LIB directory, erase DB.DCU, and rebuild
the VCL library from within Delphi.

Voila !  The component will work like a charm.

The other bad news is, although all of my custom components so far have been
freeware with source (TErrorTable and TDBValueComboBox), this one I'm going
to have to charge for since it took a few weeks to crank out (or rather
debug).  This trial component will only run while Delphi is running. The 
charge for the non-trial component is $ 20.00, and will get you the source
via CServe mail and super DBGrid component I'm working on for free when I'm 
done.  Just in case you're wondering, no InfoPower's grid will *not* work 
with this component at all, so I went and built a similar DBGrid complete
with components such as lookupcombos and more to replace this missing 
functionality.  I'll have this one done in a few days.

If you'd like to order, just send a check or money order to:

OnTYme Software
Attn: TTempDetailTable Component  (That's so I don't think it's a bill and
											  throw it out <g>)
524 Clayton St.
Orlando, FL 32804

If you're in a rush, I'll send the component to you on your word, but if I
get burnt on a lousy ten dollar check then I'll be forced to talk very badly
of you on the Delphi forum. <G>.  Seriously, if you need a freebie due to
a shortage of funds, then just ask, don't send me rubber checks or tell me
stories.  I've been there and may be there next week, so I'll understand.

******************************************************************************

Well that's about it, if you have any questions or comments please let me
know at CServe ID 73302,2561 or you can give me a buzz at 407-246-0930.

About me

I specialize in manufacturing applications, specifically make-to-order, and
am looking also to build some high level components for configurations and
bills of material.  I come from a FoxPro/Clipper background and am always 
happy to swap stories about the differences, likes/dislikes, regarding the 
two environments.  I personally don't like coding in FoxPro or Clipper too 
much anymore if you know what I mean.  By the way, if you're located in 
Orlando FL. and are interested, I'm looking to form a Delphi study/user group
to promote discussion regarding problems and solutions with Delphi in the 
local community.  Give me a call and we'll talk some more.  My office is in 
my home, but it's fairly large so I could probably fit about 10-12 people 
tops.  I'm located in College Park in Orlando, in case you're wondering......

Tim Young
OnTYme Software

Bug Fix and Enhancement History

9/21/95	-	Original TempDetailTable

******************************************************************************
I make no warranties regarding the use of this component and will not be held
responsible for any damages incurred from the use of this component.  I will
try to fix any bugs found in a reasonably timely manner.
******************************************************************************

(C) Copyright 1995 OnTYme Software
