[V4RB] Does order in constructor make difference?

Cindy Brown cindy at kowhaiprogramming.com
Sun Jan 25 09:36:33 CST 2004


Hi Ruslan,

I spent ages on this database. I thought I had got it right in the end by
changing the order but I would get to a certain point in the database and it
would fail. The program would just quit. In VAPP the data looked fine, the
methods calculated correctly.

I found, though, that in doing particular methods which are set as strings:

substr(School_Number+4659,2,1)
Substr(School_Number+4659,3,1)
Substr(School_Number+4659,1,1)

These would fail on the odd record completely. Yet:

Substr(School_Number+4659,4,1) would always work.

School_Number is a short field. You have no ability to set in a method a
field as a string and normally it just uses the number as a string if I set
it in a concat or a substr but in this case it just didn't work.

I would like to stress that in VAPP it calculates perfectly. It just in
V4RB. And I can run through 2000 records with no problems, the record
showing properly, and on the 2001st record it fails. It is actually always
the same records that fail. So then I deleted the record and retyped it in
from scratch making sure the characters were all fine. It still failed. The
record is not obviously different from the other records. I found at least
four records that fail.

Once I removed those particular method commands and actually programmed them
within RB, the records are working with no problems.

I can send you a small database on this if you want.

Cindy

> on 1/24/04 2:01 AM, Cindy Brown at cindy at kowhaiprogramming.com wrote:
> 
>> Just thought I'd add something. I found that if I create methods that rely
>> on information in a method that I created later then it seems to crash. VAPP
>> brings it up fine but spacing through a set of records creates problems. So,
>> for example, if I have a method that says CONCAT(overall1,overall2), but
>> overall1 and overall2 are methods that I created afterwards, the database
>> seems to then fail. After putting the methods in the right order (deleting
>> and recreating them) the database seems to be fine at this stage.
> 
> VERY Strange. Because I 100% sure present protection for this case.
> 
> Special for this, I do second pass on BaseObject methods to
> Get fields/methods created after this method.
> 
> Strange.
> 
> You point that overall1 and overall2 are methods.
> May be I have protection only for fields...


-- 

Cindy Brown
Programmer
SchoolMaster

Kowhai Programming Systems
PO Box 198, Invercargill
81 Marama Avenue South, 9RD Invercargill
Phone (03) 213 1243
Fax (03) 213 1248
Mobile (021) 354 930
<http://www.kowhaiprogramming.com/>




More information about the Valentina mailing list