----- Original Message -----
From: "Matt Davey" <[EMAIL PROTECTED]>
To: "MI-L (E-mail)" <[EMAIL PROTECTED]>
Sent: Tuesday, September 18, 2001 6:21 AM
Subject: MI-L Tracking changes to a table
> We have a set of data in MapInfo.
>
> The data is mappable (as points) and each record has attributes that
include
> the date the record was last modified. When a user moves a point on the
map
> we want to 'tag' the record so as when the table is saved at the end of a
> session all the edited records are modified with the new edited date.
>
> Is the last edited date stored in the table anyway?
No, it isn't and you wouldn't want to get the update date that way anyway.
> If not how do we identify the records that have been edited (MI seems to
> know as we can choose NOT to save the changes)
Well, you can certainly write a tool button handler that allows you to drag
points in that way, and update with CurDate() at the same time.
However, in order for that to be reliable, you need to guarantee that your
tool
is the *only* way to update the database.
There's a way do do this, although it is not perfect: Turn the table's
UserEdit
attribute Off. That way, people won't be able to update the table via
MapINfo's
user interface: browsers, object editing tools, the Info Tool. It is not
perfect
because other MapBasic applications can do whatever they want to
your table and you cannot stop them.
You can turn UserEdit off by invoking it in your application's
initialization
code, immediately after it opens the table.
Notice that this ties the application to the table. That may be perfectly
all right
for what you're doing. If not, you can get around this by storing the table
name
in an INI file. There may also be an "\IsUserEdit" metadata setting; the
MapInfo
folks will have to answer that.
HTH
Spencer
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.