Page 1 of 1
DC_DBRecordCompare () syntax
Posted: Mon Jan 18, 2016 12:29 pm
by Victorio
Hi,
Used anybody this function ?
I want use it, but some problems with comparing, always return .False.
In manual is 2 parameters, in source 3 . 3th is fields.
How work it ? compare all fields ?
Re: DC_DBRecordCompare () syntax
Posted: Mon Jan 18, 2016 1:59 pm
by rdonnay
Show me how you are using this.
I need to see some code.
Re: DC_DBRecordCompare () syntax
Posted: Tue Jan 19, 2016 3:24 am
by Victorio
FUNCTION ABC
LOCAL oRecord1,oRecord2
SELECT 1
USE MYFILE1 index MYFILE1
set order to 1
SELECT 2
USE MYFILE2 index MYFILE2
set order to 1
SELECT 1
go top
do while eof()!=.T.
poma:=MYFILE1->S
oRecord1 := MYFILE1->(DC_DbRecord():new())
SELECT 2
seek poma
if found()
oRecord2 := MYFILE2->(DC_DbRecord():new())
if DC_DbRecordCompare(oRecord1,oRecord2)=.T.
* identical
* ... do something
else
* not identical
* ... do something
endif
SELECT 1
skip
enddo
close all
return nil