Subject RE: [IBO] ib_query with left join invalidaterownum() problem
Author Jason Wharton
> I have ib_query containing the following sql ...
>
> SELECT M.*,
> (select description from account_titles_details d where d.id =
> m.expense_type) as Account_Title,
> D2."InvNo"
> FROM CHECKVOUCHER_DETAILS M LEFT JOIN "invoice" d2 on d2.id = m.doc_id
>
> What I want to achieve here is that after posting a new record I want
> the new record to immediately display the d2.InvNo column. My problem
> is that after the post the d2.InvNo value is not display until the
> ib_query is close and open. What I did is to perform
> ib_query.invalidaterownum(ib_query.recno) or ib_query.refresh but Iam
> getting an error saying ambiguous field name between table
> checkvoucher_details and table invoice ID.

Use the BufferSynchroFlags setting of bsfAfterInsert and see what that does
for you.

You may also need to pin down some of your sql better so things are not
ambiguous.

Jason Wharton
www.ibobjects.com