I need a function that will tell me if any data has changed in a TABLE or CURSOR.
The GETFLDSTATE( ) function is limited to a record.
Is there a similar function for table changes? If not, any clever alternatives?
[sig][/sig]
=adir() - Column5 or
= fdate() or
= ftime() or
= lupdate() or
[tt]
create a table "dbfalter" with 2 fields dbfname (c,20) datetime (datetime)
index on dbfname tag dbfname
procedure checkdbfalter
lcalias=alias()
if !used("DBFALTER"
use dbfalter order dbfname in 0
endif
llreturn = .f.
if seek(lcalias , "DBFALTER"
if DBFALTER.DATETIME != fdate(lcAlias+".dbf" , 1)
replace DBFALTER.DATETIME with fdate(lcAlias+".dbf" , 1)
llreturn = .t.
endif
else
select DBFALTER
append blank
replace DBFALTER.DBFNAME with lcAlias, DBFALTER.DATETIME with fdate(lcAlias+".dbf" , 1)
select (lcAlias)
llreturn = .t.
endif
return llreturn
endproc
[/tt]
There may be about 10 other ways but this is the first thing that came to mine (as if I have one) [sig]<p>David W. Grewe<br><a href=mailtoave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br> [/sig]
Dave's suggestion is pretty good, and one that didn't immediately come to my mind, but would work if the changes were flushed to disk.
Walker, I think what you need is GetNextModified(). You'll need to have table buffering turned on to use it. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href=
Opps, I forgot, some people open databases with an alias not the same as the database name and may not have a path set.
Replace fdate(lcAlias+".dbf" , 1)
with fdate(dbf() , 1) [sig]<p>David W. Grewe<br><a href=mailtoave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br> [/sig]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.