>Just call GETAUTOINCVALUE(0) directly from your app. Try it and come back if it doesn't work.
I understand GETAUTOINCVALUE(0) will return the primary key used at the insert time. But, where would it be returned. If it is inserted as a value as part as one of the inserted fields, then this would be inserted in a field. Thus, I would be back to square one.