Page 1 of 1

Append From

Posted: Sun Dec 18, 2005 9:54 am
by pawelu
Antonio,

I use in my program Append From commands (17.12.2005 version). When it function is invoked with cdx driver FwPpc show error:
LockFile() not supported in PocketPc.
Append with ntx driver work ok.

Sample:

Code: Select all

   Request DbfCdx
   Request DbfFpt
   RddSetDefault ('DbfCdx')
   Request Hb_Lang_PLWIN
   Request Hb_CodePage_PLWIN

   Set Century On
   Set Epoch To 1995
   Set Date German
   Set Deleted On
   Hb_LangSelect ('PL')
   Hb_SetCodePage ('PLWIN')

   Use T1 New
   Copy Structure To T2
   T1->(DbCloseArea ())
   Use T2 New
   Append From ('T1') All
   T2->(DbCloseArea ())
Regards
Pawel

Posted: Sun Dec 18, 2005 12:26 pm
by Antonio Linares
Pawel,

But is the APPEND ... properly performed ? Does the DBF change ? Thanks.

Posted: Sun Dec 18, 2005 2:26 pm
by pawelu
Antonio,

Yes, this method was previous properly. In this way I recreate table after change structure. First I create new table and append records from original table (with set deleted off statements). This method was very fast.
In this moment I change append from to dbappend() function.

Pawel

Posted: Sun Dec 18, 2005 3:09 pm
by pawelu
Antonio,

probably I find, error LockFile is show in this situation:
- dbf is open eg. use table new without index file
- index file exists when table is open
- when append from invoked, fw show error
when index dosn't exists append from work ok

Code: Select all

use test1 new // without index file, index test1.cdx exists
copy structure to test2
test1->(dbclosearea ())
use test2 new
append from ('test1') all
test2->(dbclosearea ())
Pawel