Necmi Göcek
2/7/2006 5:01:00 PM
First of all, The restriction about comma seperated field count is <= 474 not
483. Sorry for misinformation.
I found that number with this simple job.
static void N_QuerySize(Args _args)
{
InventTable inventTable;
Query q;
QueryRun qr;
QueryBuildDataSource qbdsInventTable;
int i;
str strItemIds;
;
while select ItemId from inventTable
{
i++;
if(i <= 474)
strItemIds += ","+inventTable.ItemId;
else
break;
}
i = 0;
strItemIds = strdel(strItemIds,1,1);
q = new Query ();
qbdsInventTable = q.addDataSource(tablenum(InventTable));
qbdsInventTable.addRange(fieldnum(InventTable, ItemId)).value(strItemIds);
qr = new QueryRun (q);
while (qr.next())
{
i++;
}
infolog.add(Exception::Info,qbdsInventTable.toString());
infolog.add(Exception::Info,strfmt("ORed fields Count: %1",i));
infolog.add(Exception::Info,strfmt("String Size:
%1",strlen(qbdsInventTable.toString())));
}
--
_MIB_
"Mike Frank" wrote:
> Hi Necmi,
>
> > The restriction about comma seperated string is 483. It means you can use 483
> > ORed values in QueryRange object. If i'm wrong please let me know.
>
> Is it really 483 values or is the restriction on the string length? Where did you get this
> information from?
>
> I believe there is a restriction on query strings in SQL, bit I can't remember what the specifics are.
>
> Mike
>