Vserver v4.3
Stan Busk
maxprog at mac.com
Mon Apr 5 04:52:34 CDT 2010
Hi Ivan,
The function code is:
aCursor = inDatabase.SQLSelect( aQuery, EVCursorLocation.kServerSide, EVLockType.kNoLocks, EVCursorDirection.kRandom )
If aCursor <> nil then
If aCursor.RecordCount > 0 then
Do
aCurrency = aCursor.ULongField("Account_CurrencyRecord").Value
aBalance = aCursor.DoubleField("Account_Balance").Value
aResult = aResult + ConvertToDefaultCurrency( inDatabase, aBalance, aCurrency ) <----- CRASH HERE AFTER 6 OR 7 ITERATIONS
Loop Until not aCursor.NextRecord()
end if
end if
It crashed inside the 'ConvertToDefaultCurrency' function. This is function code is:
If inCurrency > 0 then
aRate = inDatabase.mCurrency.GetRate( inCurrency )
aDirection = inDatabase.mCurrency.GetCurrencyDirection( inCurrency )
If aRate = 0 then aRate = 1
If aDirection = 0 then
Return inNumber / aRate
elseif aDirection = 1 then
Return inNumber * aRate
end if
else
Return inNumber
end if
inDatabase.mCurrency.GetRate code is:
If isValid( inRec ) then
Return mRate.Value
end if
inDatabase.mCurrency.GetCurrencyDirection is:
If isValid( inRec ) then
Return mDirection.Value
end if
In both cases isValid code is:
If RecordExists( inRec ) then
RecID = inRec
Return True
else
Return False
end if
Stan
> There are different calls. Probably you call Table_SetRecID inside
> this loop?
> Could you show whole loop?
More information about the Valentina
mailing list