Inserting data in temporary RecordRef

TamgambilyTamgambily Member Posts: 5
Hello eyerone,

I'm trying to fill a temporary RecordRef but it doesn't work.
REPEAT
  oRecRef.GETTABLE(rRessource);
  oNewTempRecRef.OPEN(156,TRUE);

  oFieldRef := oRecRef.FIELDINDEX(1);
  oTempFieldRef := oNewTempRecRef.FIELDINDEX(1);
  oTempFieldRef.VALUE := oFieldRef.VALUE;

  oNewTempRecRef.INSERT;
UNTIL rRessource.Next = 0;

At the end I've just one record in oNewTempRecRef. oNewTempRecRef.COUNT = 1.

Any ideas?

With regards,
Tam[/code]

Comments

  • TamgambilyTamgambily Member Posts: 5
    ](*,) think first... then post

    If I open my RecRef again temporary it can't work.
    oNewTempRecRef.OPEN(156,TRUE); 
    REPEAT 
      oRecRef.GETTABLE(rRessource); 
    
      oFieldRef := oRecRef.FIELDINDEX(1); 
      oTempFieldRef := oNewTempRecRef.FIELDINDEX(1); 
      oTempFieldRef.VALUE := oFieldRef.VALUE; 
    
      oNewTempRecRef.INSERT; 
    UNTIL rRessource.Next = 0; 
    
  • matteo_montanarimatteo_montanari Member Posts: 189
    oNewTempRecRef.OPEN(156,TRUE);
    REPEAT
    oRecRef.GETTABLE(rRessource);

    oFieldRef := oRecRef.FIELDINDEX(1);
    oTempFieldRef := oNewTempRecRef.FIELDINDEX(1);
    oTempFieldRef.VALUE := oFieldRef.VALUE;

    oNewTempRecRef.INSERT;
    UNTIL rRessource.Next = 0;
    oNewTempRecRef.CLOSE

    Suggest: oNewTempRecRef as local variable.

    Eto
    Reno Sistemi Navision Developer
  • mukshamuksha Member Posts: 274
    Instead of using

    oNewTempRecRef.CLOSE

    Can we use

    oNewTempRecRef.RESET
    Mukesh Sharma
Sign In or Register to comment.