xsharp.eu • APPEND with for
Page 1 of 1

APPEND with for

Posted: Wed Jun 26, 2024 11:47 am
by COMSYSplus
Hi everyone,

we just try to convert your VFP 9.0 software applications zu x#.

We get some problems with "APPEND for". The "for" clauses appends less data then our VFP code ( which works well )

Is something different in x#, have we to set something ?

Thank you very much for helping.

Peter

Re: APPEND with for

Posted: Wed Jun 26, 2024 5:30 pm
by robert
Peter

Can you post a sample of the code and data?

Robert

Re: APPEND with for

Posted: Thu Jun 27, 2024 3:32 pm
by COMSYSplus
Robert,

we did it with following Code:

XSharp:

COPY FILE "Zwischen\f_artike_kopie.DBF" to "Zwischen\005_f_artike_use.dbf"
COPY FILE "Zwischen\f_artike_kopie.FPT" to "Zwischen\005_f_artike_use.fpt"
COPY FILE "Zwischen\f_artike_kopie.CDX" to "Zwischen\005_f_artike_use.cdx"

select 0
use "Zwischen\005_f_artike_use" alias artikel exclusive
delete all for recno() > 0
pack
use
select 0
use "Zwischen\005_f_artike_use" alias artikel

append from "Zwischen\f_artike_kopie" for ALLTRIM(Artiknr) < "2000"


=========================================================================================

VFP:

COPY FILE "Zwischen\f_artike_kopie.DBF" to "Zwischen\005_f_artike_use.dbf"
COPY FILE "Zwischen\f_artike_kopie.FPT" to "Zwischen\005_f_artike_use.fpt"
COPY FILE "Zwischen\f_artike_kopie.CDX" to "Zwischen\005_f_artike_use.cdx"

select 0
use "Zwischen\005_f_artike_use" alias artikel exclusive
Zap
use
select 0
use "Zwischen\005_f_artike_use" alias artikel

append from "Zwischen\f_artike_kopie" for ALLTRIM(Artiknr) < "2000"

=========================================================================================

The result is:

XSharp: ==> Datensätze nach append for: 16 <==
VFP: ==> Datensätze nach Append for: 37 <==


I attach the tables which we are using als zip-file.

Peter