Subject AssignSQLWithSearch & V4.3Aa
Author sdbeames
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