Subject [IBO] Params and DeleteSQL
Author Paul Hope
Hi

IB5.6 D6 IBO4.2Ie

I was trying to discover why my delete SQL wasnt working and it seems to be because param values are not being applied - heres the monitor

delete from forecast_accounts where acno=? /* old_acno */
and company=? /* old_company */
and not exists(select * from rep_forecast f where f.acno=? /* old_acno */
and f.company=? /* old_company */ )

PLAN (F INDEX (RDB$PRIMARY75))
PLAN (FORECAST_ACCOUNTS INDEX (RDB$PRIMARY34))
FIELDS = [ Version 1 SQLd 0 SQLn 30 ]
SECONDS = 0.016
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 23229232
STMT_HANDLE = 23228204
PARAMS = [ Version 1 SQLd 4 SQLn 4
[OLD_ACNO] = 4696
[OLD_COMPANY] = 'A'
[OLD_ACNO] = <n> 0
[OLD_COMPANY] = <n> '' ]

The 'not exists' will fail with silly values in the parameters. What does the <n> mean and what can I do to get round this?

Regards
Paul



[Non-text portions of this message have been removed]