jvp123
28th July 2011, 15:58
When inserting with skip duplicates how do I know when something has been inserted or not.

I tried


ret = db.insert(ttable, db.retry, db.skip.dupl)


But ret is always zero (0), regardless of record being inserted or not.

rahul.kolhe22
28th July 2011, 16:59
Hi,

As per programmers guide option "db.skip.dupl" will neither go back to the retry point nor return an error code when adding an already existing record.

May be you can give a try to option "db.return.dupl". This option will return you the error code if duplicate record is been getting inserted.

Hope it helps you.

Regards,
--Rahul

Hitesh Shah
29th July 2011, 18:29
db.return.dupl will set e to 100 . U can check the same in code.

jvp123
1st August 2011, 10:46
db.return.dupl will set e to 100 . U can check the same in code.

Yep. Did it like that. Worked!

-Cheers-