ISTech Support Forum
http://www.istechforum.com/YaBB.pl
Evo-ERP and DBA Classic >> Source Code and Programming in TAS >> Runtime Errors...
http://www.istechforum.com/YaBB.pl?num=1069098488

Message started by ITman on 11/17/03 at 11:48:08

Title: Runtime Errors...
Post by ITman on 11/17/03 at 11:48:08

Does anyone know where I can get a list of runtime errors for Tas6pro?  Preferably for use with flerr() ?

Title: Re: Runtime Errors...
Post by ITman on 11/17/03 at 12:41:32

Actually, I'm looking for the best code that will read a file for records and if not found, delete the same records from another file if they are found.  Ie.  I'm tyring to sync up two databases somewhat.

I was using 'findv'  and if a record isn't found in the first file, it will do a find in the other and delete the record in the second.   Then I just use del @file

Any other easy way?

Title: Re: Runtime Errors...
Post by NovaZyg on 11/17/03 at 19:57:16


dall @file.b for filter() = .t.
{
 func filter
   findv M fnum file.a key x.x.x val data.from.file.b
   if flerr(file.a) = 0
     ret .f.
    endif
 ret .t.
}

Title: Re: Runtime Errors...
Post by NovaZyg on 11/17/03 at 20:13:41

actually that will sync the whole database in one shot!

if you just want to sync when there is an error in the first file lookup to delete in the second then ...

findv M fnum file.a key x.x.x val lookup.data
if flerr(file.a) <> 0
 // Data not found in File A
 findv M fnum file.b key x.x.x val lookup.data
 if flerr(file.b) = 0
    // data is found in File B delete it.
   del @file.b nocnf
  endif
endif


Title: Re: Runtime Errors...
Post by ITman on 11/18/03 at 11:01:13

That's what I'm looking for!  Thanks!

ITman

ISTech Support Forum » Powered by YaBB 2.1!
YaBB © 2000-2005. All Rights Reserved.