Example of including error checking routines in RunRev code

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Sep 3 00:36:14 CDT 2008


On 9/3/08 5:43 AM, "william humphrey" <shoreagent at gmail.com> wrote:

Hi William,

> Ok -- solved #2 how to fix it (no more RunRev errors)
> 
> 
>   *put* VDatabase_SqlSelect( gDatabase, tSQL2 ) into CursorRef
> 
> 
>    *put* VCursor_RecordCount(CursorRef) into recNum
> 
>    *if* recNum > 0 *then*
> 
>       *put* VCursor_GetRecords(cursorRef,1,12,tab,*return* ) into fld
> "phone_numbers"
> 
>    *else*
> 
>       *put* empty into fld "phone_numbers"
> 
>    *end* *if*

1) this code from point of c++ developer also is not careful.
    you have check that cursor is not empty good.
    but then you without any checks say GIVE ME 12 records.

    But you are not C++ developer, you are SCRIPT language developer.
    and therefore...


2) as I understand this GIVE ME 12 records works fine even if cursor have
e.g. 5 records.

Then I think it is not good that function complains on empty cursor.
Please report this issue into Mantis. We will fix it.

 
> *
> *
> 
> *-- On an aside, it is really nice that the Valentina API functions are such
> unique names as anyone with a problem can just use our friend google to find
> he solution.*

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list