Error in Function Name

Beatrix Willius bwillius at gmx.de
Sun Jul 18 11:07:21 CDT 2010


Sometimes I'm getting an error VException 591118 Error in function name "PathSort". The SQL is the following

select RecID, MailboxPath, WhereClause, PathSort(MailboxPath) from mailbox order by 4

The function PathSort is created when the database is created

  theSQL = "create or replace function PathSort(thePath string) returns string begin case when lower(list_nthitem(thePath, 1, ':')) = 'inbox' then return concat('1:', replace(replace(thePath, ' ', 'zzzyyy'), ':', 'zzzxxx')); when lower(list_nthitem(thePath, 1, ':')) = 'sent' then return concat('2:', replace(replace(thePath, ' ', 'zzzyyy'), ':', 'zzzxxx')); when lower(list_nthitem(thePath, 1, ':')) = 'sent messages' then return concat('2:', replace(replace(thePath, ' ', 'zzzyyy'), ':', 'zzzxxx')); "
  thesql = theSQL + "when thePath = 'Trash' then return concat('3:', replace(replace(thePath, ' ', 'zzzyyy'), ':', 'zzzxxx')); when lower(list_nthitem(thePath, 1, ':')) = 'views' then return concat('4:', replace(replace(thePath, ' ', 'zzzyyy'), ':', 'zzzxxx')); else return concat('5:', replace(replace(thePath, ' ', 'zzzyyy'), ':', 'zzzxxx')); end case end"
  call ValentinaDB.SqlExecute(theSQL)
  
I know that the function works but why do I sometimes get the error? The error message isn't really helpful. I have seen this after opening a database. A customer has the error message after adding data to the database.



Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: archive, clean and search email
http://www.beatrixwillius.de
Fractals, 3d landscapes etc.



More information about the Valentina mailing list