Subject Re: [IBO] AssignSQLWithSearch & V4.3Aa
Author jwharton@ibobjects.com
I'm not entirely sure what all may have changed if anything.
If there is a master parameter then it will likely get passed along.
If you are using the MasterLinks property then it may not be passed along.
My feelings on this are that it should pass along the value to the parameter from the masterlinks but obviously as a static
piece of data.

Jason Wharton
www.ibobjects.com

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
G'day,
I have a TIB_Query (OrderItemsQry, which is a detail qry) to
display the data, and a TIBOQuery with no DataSource(PrintQry) to
print it via a TQuickRep

With V4.2Ie, I was able to use code like ...

PrintQry->AssignSQLWithSearch(OrderItemsQry);
if (!PrintQry->Prepared)
PrintQry->Prepare();
PrintQry->Open();
QuickRep1->Preview();

to get a printable version of the info displayed by OrderItemsQry.

Now, with V4.3Aa/b it seems to send out a null value for the
masterlink parameter, resulting in an empty report.

PREPARE STATEMENT
...
SELECT ITEM_ID
~ snip ~
FROM ORDER_ITEMS OI
left outer join CLIENTS C on C.CLIENTNO=OI.CLIENTNO
left outer join ACCOUNTS A on A.ACCNT_ID=OI.ACCNT_ID
WHERE ORDER_ID=? /* MLNK_ORDER_ID_0 */
ORDER BY ORDER_ITEMS.PART_NO ASC

EXECUTE STATEMENT
TR_HANDLE = 17327616
STMT_HANDLE = 39497948
PARAMS = [ Version 1 SQLd 1 SQLn 1
[MLNK_ORDER_ID_0] = <NULL> ]

To get this to work again, I've had to drop the AssignSQLWithSearch
line and use a pre-entered parameterised SQL for the TIBOQuery. This
works, but should it be needed? Or, was I just lucky before?

Cheers,
Steve