#1 2015-11-06 19:18:51

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

CreateAndFillPrepare with IN Expression throws exception

Excpetion:

unexpected array size

is thrown using TSQLRecord.CreateAndFillPrepare
with in - Expression in SQL - Statement:

Sample:

// This works

    TAutoFree.One(RRec, TSQLTestRecord.CreateAndFillPrepare(RestModel, 'ValueID=?', [LRecord.ID]));

// This nor
    TAutoFree.One(RRec, TSQLTestRecord.CreateAndFillPrepare(RestModel, 'ValueID IN (?)', [LRecord.ID]));

i testet it also with other IN Statement but no success


Rad Studio 12.1 Santorini

Offline

#2 2015-11-06 19:37:27

danielkuettner
Member
From: Germany
Registered: 2014-08-06
Posts: 357

Re: CreateAndFillPrepare with IN Expression throws exception

The ? tries to do a prepared statement, right?
When the db backand can't prepare such a "IN" statement, then it throws an exception.

Offline

Board footer

Powered by FluxBB