Can't create method

jda jda at his.com
Sun Jan 18 18:41:36 CST 2004


>
>Looks to be a bug.
>Crash happens during Update record.
>
>Probably secret in your formula...

  I've diagnosed this as far as I can. This is the problem:

 
authorEditorSortMethod.SetMethod("Upper(if(length(authors)=0,editors,authors))")


It's the authors field that is trashed when I use this method -- 
attempts to update the authors field -> crash. If I substitute 
another field, e.g.

 
authorEditorSortMethod.SetMethod("Upper(if(length(title)=0,editors,authors))")

then the authors field is OK. But if I subsequently try to edit the 
title field, it crashes.


Furthermore, I think it's the length function that's the problem. If I use

   authorEditorSortMethod.SetMethod("Upper(if(authors='',editors,authors))")


the database is not corrupted (the sort doesn't work properly, though).

So, Ruslan, it looks like the length function in this method is 
causing damage to the field whose length is being checked.

Jon


More information about the Valentina mailing list