DC_DBRecordCompare () syntax

This forum is for eXpress++ general support.
Post Reply
Message
Author
Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

DC_DBRecordCompare () syntax

#1 Post 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 ?

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC_DBRecordCompare () syntax

#2 Post by rdonnay »

Show me how you are using this.

I need to see some code.
The eXpress train is coming - and it has more cars.

Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: DC_DBRecordCompare () syntax

#3 Post 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

Post Reply