E-PC: Incorrect Sequence For Bind Variables in SQLExec (Doc ID 2059359.1)

Last updated on SEPTEMBER 23, 2015

Applies to:

PeopleSoft Enterprise PT PeopleTools - Version 8.4 and later
Information in this document applies to any platform.

Symptoms

Bind variables for SQLExec are being bound in the wrong order.  The problem seems to affect most commonly Application Engine programs on MS SQL Server platforms, but is not exclusive to it.

For example, the original PeopleCode statement might be:
SQLExec("UPDATE PS_TEST_TBL SET TEST1_AMT = :3, TEST2_AMT = :4, TEST3_AMT = :5 WHERE BUSINESS_UNIT = :1 AND TEST_ID = :2", &PREV_BU, &PREV_VOUCHER, &VOUCHER_GROSS_AMOUNT, &VOUCHER_SALETX_AMOUNT, &VOUCHER_VAT_ENTERED_AMOUNT);

At runtime, the SQL becomes:
UPDATE PS_TEST_TBL SET TEST1_AMT = :1, TEST2_AMT = :2, TEST3_AMT = :3 WHERE BUSINESS_UNIT = :4 AND TEST_ID = :5


Notice the bind variable sequence was changed.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms