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

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

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

Post 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
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

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

Post 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
Post Reply