on tdatabase to inser ta a record I use
oElemento:=oElementi:record(.t.)
and to modify
oElemento:=oElementi:record()
How I can make to have a duplicate record to modify ?
duplicate record (tdatarow)
- Silvio.Falconi
- Posts: 7170
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 5 times
duplicate record (tdatarow)
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: duplicate record (tdatarow)
Code: Select all | Expand
oRec := oDbf:Record() // existing record
oRec:Copy()
oRec := oDbf:Record( .t. ) // new record to append
oRec:Paste()
oRec:Edit()
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Silvio.Falconi
- Posts: 7170
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 5 times
Re: duplicate record (tdatarow)
thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Silvio.Falconi
- Posts: 7170
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 5 times
Re: duplicate record (tdatarow)
Nages, do you think it is right ?
oElementi:= TDatabase():Open( , cDir+"Elementi", "DBFCDX", .T. )
oElementi:setorder(1)
oElementi:gotop()
//sample for duplicate
oElemento:=Editsetup(oElementi,3,oElemento)
oElementi:= TDatabase():Open( , cDir+"Elementi", "DBFCDX", .T. )
oElementi:setorder(1)
oElementi:gotop()
//sample for duplicate
oElemento:=Editsetup(oElementi,3,oElemento)
Code: Select all | Expand
Function Editsetup(oDbf,nMode,oRec)
IF nMode==1 //add
oRec := oDbf:record(.t.)
Elseif nMode == 2 //mod
oRec := oDbf:record()
elseif nMode:= 3 //duplicate
oRec := oDbf:Record() // existing record
oRec:Copy()
oRec := oDbf:Record( .t. ) // new record to append
oRec:Paste()
//oRec:Edit()
Endif
return oRec
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com