At 1:46 AM -0700 5/17/99, Mike Davis wrote:
>I don't see a cooresponding DmRead type function.  What is
>the best way to read one variable at a time from a DB record?

As Keith says, you don't need DmRead.

I think you might find it useful to adopt a PackRecord/UnpackRecord
approach, much like the built in apps use.

That is, when you "open" a record, call UnpackRecord which essentially
copies it into a fixed-length structure in the dynamic heap.  Then you do
as much editing as you want in this somewhat easier to use structure.

When you're done editing, you call PackRecord once, and it's this routine
which is responsible for determining the minimum size for the saved data,
resizing the data manager handle, and writing the changed data back into
the database.

This does a reasonable job of isolating the code that knows about the
database format from the code that does the editing, and give you a nice
bottleneck for load/save operations, which may save you time later when
you're debugging.

                                --Bob


Reply via email to