>>I never noticed this, but is now in the way. When I issue a INSERT command the _TALLY reports zero record affected when in fact it should be 1.
>>
>>
>>CREATE CURSOR test (name c(10))
>>INSERT INTO test VALUES ("test")
>>? _tally
>>
>>
>>Help indicates that it should return 1.
>>
>>Is my wrong here?
>
>I don't know whether this is related, but after doing a REPLACE ... which must have affected hundreds of records, _tally was equal to 1. While I didn't investigate this case thoroughly, I figured that the auditing function which gets triggered from nearly every table resets the _tally. Probably I will have to correct it so that it saves the _tally value before writing to the audit table, and restores after that.
>
>In other words, check if no additional function gets triggered by the INSERT command.
I discovered this problem while writing unit test for my Query tool. The Insert statement being executed is a simple SQL statement. The _TALLY variable appear to never get set rather then be reset to zero. If I set the _Tally variable to are known value and execute a insert statement, the variable retains its original value.
I have worked a workaround, as ugly as it is, that calculates the number of records inserted. It is my understanding that this iswhat the _tally variable is suppost to have returned.
Greg Reichert