>>What is the exact code of PrimaryKey() procedure?
>
>Don't think I can post that here since this is a purchased framework.
Ok. I think the problem is somewhere it this code. Examine it carefully, especially what would it do in case of errors.
If it's not broken, fix it until it is.
My Blog