Page 1 of 1

how to tell apart the separate dbfs with same name in differ

Posted: Tue May 17, 2011 3:59 am
by huangchenmin
Deal all
how to tell apart the separate dbfs with same name in different workarea ?
such as
USE \viswrx\CO03L VIA "DBFCDX" alias RX3L index \viswrx\CO03L share new
USE \visw\CO03L VIA "DBFCDX" alias CL3L index \visw\CO03L share new
I would like to append form CO03L in viswrx
How should I code the routine?
『append from from RX3L for condition』
It is not work!
Please Help
I thank you in advance.
Best Regards
chenmin

Re: how to tell apart the separate dbfs with same name in di

Posted: Tue May 17, 2011 6:46 am
by mol
Here you can see syntax of APPEND (clipper 5.2)
APPEND FROM <xcFile>
[FIELDS <idField list>]
[<scope>] [WHILE <lCondition>] FOR <lCondition>]
[SDF | DELIMIED [WITH BLANK | <xcDelimiter>] ]

As you can see, you must point source file, append doesn't work from selected area.

You can realise it with loop

Code: Select all

RX3L->(DBGoTop())
select("CL3L")
do while !RX3L->(eof())
  append blank
  for i := 1 to fcount()
    FieldPut(i, RX3L->(FieldGet(i)))
  next i
  RX3L->(DBSkip())
enddo