Example of including error checking routines in RunRev code
Robert Brenstein
rjb at robelko.com
Wed Sep 3 06:44:49 CDT 2008
On 03/09/08 at 08:36 +0300 Ruslan Zasukhin apparently wrote:
>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...
>
This is not good from a point of view of Rev developer, either,
Ruslan. There should be a check whether CursorRef is ok, just like in
any other language.
Robert
More information about the Valentina
mailing list