How to find the record using RecordRef.

aman_mbsaman_mbs Member Posts: 158
Dear All,
I am accessing the data from Access to Navision, I need to Find the record with the fieldREf data type Like we use the get or setrange command in the navision to find the record.
I will make a temporary variable of RecordREf and then Find the record in it.I dont know how to find the record using the recordREf.

CREATE(varRecordSet);
varRecordSet.Open(StrSql, Constr);
varRecordSet.MoveFirst;
RecordVar.OPEN(50002);
REPEAT
varFldCollection := varRecordSet.Fields;
// Here I will make the temp recordRef and find the Item in it.
IF FORMAT(varFldCollection.Item(1).ActualSize) <> FORMAT(0) THEN
ltModelItem.VALIDATE("Item Description", varFldCollection.Item(1).Value);
IF FORMAT(varFldCollection.Item(2).ActualSize) <> FORMAT(0) THEN
ltModelItem.VALIDATE("Design No", varFldCollection.Item(2).Value);
ltModelItem.VALIDATE("Product Type", varFldCollection.Item(3).Value);
Aman Kumar Gupta

Comments

  • BeliasBelias Member Posts: 2,998
    declare a record variable of subtype 50002 and do
    for sure you have to do an appropriate get or find on the record variable
    RecRef.setposition(record.getposition)
    
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • aman_mbsaman_mbs Member Posts: 158
    Hello thanks for the speedy reply

    i will make a temp recordset RecordVar.OPEN(50002, TRUE); then fill this temp recordref and the i have to find the items it this record set hw will i do this. RecordVar is the variable of recordREf.
    Aman Kumar Gupta
  • BeliasBelias Member Posts: 2,998
    ok...if now i understood well, you mean: you have rref evaluated like this

    1 my first
    2 my second
    3 my third

    and you want to output 1,2 and 3...don't you?
    if this is your need, then see this
    http://www.mibuso.com/forum/viewtopic.php?f=5&t=21295
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
Sign In or Register to comment.