Why don't you box up a simple, replicable example and send to RBTI. Just a guess, but it looks to me like it is getting the $8 value from the size of the currency storage (two Integers of 4 bytes each) rather than the value of the storage.
----- Original Message ----- From: <[email protected]> To: "RBASE-L Mailing List" <[email protected]> Sent: Tuesday, October 11, 2011 10:14 AM Subject: [RBASE-L] - Guarantee you've never seen this problem.... : Wow, this one beats everything I've seen since going back to RBase System V : days... : : Converting a client from dos, I did not create this database, working with : 7.6 but I tried it in 9.1 and the same problem is there. Form is based on : Invoices table. We have a test database set up there, and they reported an : error. Of course, it works perfectly fine in my test environment here. : : This is going to be really hard to describe.... I'm sure I will confuse : you all, but here goes. : : The table has a computed column, all datatypes are Currency : InvTot (INVSUB+ ADDED01+ ADDED02+ INVTAX+ FREIGHT) : : Displayed on my form is a variable to display that: : vInvTot (.vInvSubCurr + ADDED01 + ADDED02 + .vTotalTax + FREIGHT) : : The 3 columns Added01, Added02 and Freight are directly editable on the : form using DBEdits. For vInvSubCurr and vTotalTax, these are form expressions : that rely on editable variables; these are not presenting any problems. : : Here's the problem: Someone changes a field that causes vInvSubCurr or : vTotalTax to be re-evaluated, which causes the formula for vInvTot to be : re-evaluated. If any of those 3 DBEdit fields (Added01, Added02, Freight) are : empty, it evaluates that field as having the value of $8 when adding up : vInvTot!!! If I put actual values in those DBEdits, even $0, then vInvTot adds up : fine. But leave any of them blank, and it adds an $8. However, the table : data is perfectly fine -- it does NOT store those $8 values, all 3 columns : would stay null and InvTot is perfect. So the problem isn't with my data, : it's the fact that displaying the vInvTot form on the screen shows the : incorrect total. : : How I found the $8 thing: I created form variables like: vAdded01 = : Added01 and put them on the form alongside the DBEdits for all 3 of those fields. : When the form initially loads for a row where all 3 fields are null, all 3 : varaibles show $0 correctly. But as soon as I type something in one of the : other fields that causes vInvTot to reevaluate (part of vInvSubCurr or : vTotalTax calculations) then you see the variables change to $8, although the 3 : DBEdits stay blank!! : : Things I checked and did: : 1. The DBEdit controls do NOT have a default value in the properties : tabs. : 2. Went into RBDefine to verify there is no default value in the : columns. : 3. I started a form from scratch putting in just a half dozen fields to : test this, and it's the same $8 wrong values!! So my form isn't corrupted. : 4. Database auto-checks okay and reloads okay. Did an "unload all" and : it works incorrectly on the unloaded database!! : 5. My Set Null can be set to either -0- or a blank, no difference. Set : EqNull ON or OFF also makes no difference. : 6. I brought their database to my computer here, and it works : incorrectly, so it's not a hardware/OS difference between me and them. : : So am I right? Is this really screwy? It points to a database problem or : setting issue since (1) it works fine here, (2) creating a new form : displayed the same error, (3) their database works incorrectly here. Is there any : other kind of setting you can think of that I need to change?? (I did a : quick workaround by issuing a NEXTROW command after the editable fields; since : the form is only brought up for 1 invoice at a time, this causes the row to : refresh and show the correct null values in the calculation.) : : Karen : : --- RBASE-L ================================================ TO POST A MESSAGE TO ALL MEMBERS: Send a plain text email to [email protected] (Don't use any of these words as your Subject: INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH, REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP) ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [email protected] In the message SUBJECT, put just one word: INTRO ================================================ TO UNSUBSCRIBE: Send a plain text email to [email protected] In the message SUBJECT, put just one word: UNSUBSCRIBE ================================================ TO SEARCH ARCHIVES: Send a plain text email to [email protected] In the message SUBJECT, put just one word: SEARCH-n (where n is the number of days). In the message body, place any text to search for. ================================================

