* * Sets the alias(es) for transaction processing. This * class will process whatever is in the array as one * transaction. The programmer can set this value at * any time allowing tremendous flexibility in what tables * or views need to be included in a transaction. * LPARAMETERS lcAliases LOCAL i, lnComma, lnStart, lnCount WITH THIS * * Start fresh * .paAlias = .F. lnCount = 0 lnComma = 0 lnStart = 1 * * The parameter is a comma delimited string of aliases. * FOR i = 1 TO LEN(lcAliases) lnCount = lnCount + 1 DIMENSION .paAlias[lnCount] lnComma = AT(",", lcAliases, i) IF lnComma <> 0 .paAlias[lnCount] = ALLTRIM(SUBSTR(lcAliases, ; lnStart, lnComma - lnStart)) lnStart = lnComma + 1 ELSE .paAlias[lnCount] = ALLTRIM(SUBSTR(lcAliases, lnStart)) i = LEN(lcAliases) + 1 ENDIF ENDFOR ENDWITHSo there you have it. Not much else to the whole class. The revertdb method simply rolls through the array issuing a tablerevert() for all. The only other thing you need is whatever error checking you want. There's probably folks here who have a better string parser, but what the heck, it works. The key of course is the ability to be able to adjust the aliases you want enclosed in a transaction. oTransaction.SetAliases(cSomeCommaDelimitedStringOfAliases)