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 ?
DC_DBRecordCompare () syntax
Re: DC_DBRecordCompare () syntax
Show me how you are using this.
I need to see some code.
I need to see some code.
The eXpress train is coming - and it has more cars.
Re: DC_DBRecordCompare () syntax
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
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