This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Use of PifNewQueryFromFmtName on Connect-IT

Hello,

Do you use PifNewQueryFromFmtName with a while/wend ?

For example in the mapping we have :

---------------

hQ=PifNewQueryFromFmtName("AM","EmplDept","Name LIKE 'tot%'")

while (lErr = 0)
   lErr=PifQueryNext(hQ)

   Var_lEmplDeptID=PifQueryGetLongVal(hQ,"lEmplDeptID")

   Var_Name=PifQueryGetStringVal(hQ,"Name")

    ...

    piflogInfoMsg Var_Name

wend

lErr = pifQueryClose(hQ)

---------------

In the log, we can see 2 records  (toti and tota) but we can't update these 2 records, only 1 record is updated (we use Var_lEmplDeptID as key).

Thanks

Tags:

  • Suggested Answer

    0

    I use this all the time, but for each source connector produced document, filter clause "Name LIKE 'tot%'" is more like "Name = '" & [Name] & "'", so it seems as though your mapping logic above only returns first result every time because it is accessed each time like it is the first time (ie. there is nothing stating go get next result).