Page 1 of 1

{ fn dateAdd} does not work

Posted: Mon 05 Sep 2016 09:24
by albourgz
using unidac 6.13, c++ builder xe10 seattle, oracle 12c.
UniQDateFunc is a TUniQuery.

Code: Select all

    UnicodeString s;
    UniQDateFunc->Active=false;
    UniQDateFunc->SQL->Text=L"select {fn DATEADD(hour,:1,:2) } from dual";
    UniQDateFunc->Prepare();
    UniQDateFunc->Params->Items[0]->AsInteger=1;
    UniQDateFunc->Params->Items[1]->AsDateTime=Now();
    UniQDateFunc->Active=true;
gives a run-time error. I tried to swap :1 and :2, no change.

Re: { fn dateAdd} does not work

Posted: Fri 09 Sep 2016 13:22
by AlexP
Hello,

Thank you. We have reproduced and fixed this behavior. Currently, to solve the issue, it is enough to swap parameter types:

Code: Select all

    UnicodeString s;
    UniQDateFunc->Active=false;
    UniQDateFunc->SQL->Text=L"select {fn DATEADD(hour,:1,:2) } from dual";
    UniQDateFunc->Prepare();
    UniQDateFunc->Params->Items[0]->AsDateTime=Now(); 
    UniQDateFunc->Params->Items[1]->AsInteger=1;
    UniQDateFunc->Active=true;