* private data session - set up the defaults set sysformats on set deleted on set talk off set notify off set multilocks on * open the appropriate tables if ! dbused('MessageLog') open data .\data\messagelog endif use ('messagelog!' + this.cMessageLogView) in 0 nodata * create some indexes cursorsetprop('buffering', DB_BUFOPTRECORD, this.cMessageLogView) select (this.cMessageLogView) * date/time message was sent index on messagesent tag messagesen addi * message type then messagesent descending index on str(messagetype) + str({^2100-01-01 00:00:00} - messagesent) tag messagetyp addi * priority ascendiing then messagesent descending index on str(priority) + str({^2100-01-01 00:00:00} - messagesent) tag priority addi * sender then messagesent descending index on sender + str({^2100-01-01 00:00:00} - messagesent) tag sender addi * set the initial order set order to priority * buffering back to table cursorsetprop('buffering', DB_BUFOPTTABLE, this.cMessageLogView)The problem is that the three composite indexes generate the error:
<B>Field Type</B> MessageSent DateTime Priority Integer MessageType Integer Sender Character (10)Note that the first index statement does not generate an error, nor does the statement I'm using as a (poor excuse for an) interim measure:
index on str(messagetype) + ttoc(messagesent,1) tag messagetyp addietc