I noticed a problem using tDatabase Copy() / Paste(aVals)
Wihout selected fields, record 9 is copied to 10
![Image](http://www.pflegeplus.com/IMAGES/Network13.jpg)
METHOD Copy()
METHOD Paste( aVals )
using Paste() without aVals works
adding aVals doesn't work
![Sad :(](./images/smilies/icon_sad.gif)
Code: Select all | Expand
FUNCTION NET_COPY4 ( nStart, nEnd, lFields )
Local lReturn := .T., aVals := { oCust:Last, oCust:First }
IF nStart = nEnd
lReturn := .F.
MsgAlert( "nStart = nEnd" + CRLF + ;
"Not possible, to copy Record + ALLTRIM(STR(nRecord)) !", "ERROR")
RETURN lReturn
ENDIF
oCust:Copy() // copy fields of selected record
IF nEnd > 0 // no append
oCust:KeyGoTo( nEnd ) // go to defined record
ELSE
oCust:Append()
ENDIF
oCust:Lock()
IF lFields = .T. // using selected fields
oCust:Paste(aVals) // doesn't work !
ELSE
oCust:Paste() // works
ENDIF
oCust:SAVE()
oCust:Commit()
oCust:UnLock()
RETURN lReturn
maybe something wrong with paste()
![Question :?:](./images/smilies/icon_question.gif)
regards
Uwe
![Question :?:](./images/smilies/icon_question.gif)