I have written a wrapper that gives me the ReturnValue of an ExecuteSQL command to the DI server. When I supply SQL which contains a field that contains 'from', I don't get the expected SQL:
SELECT ItemCode, CardCode, LINENUM, Price, Currency, Discount, ListNum,
FromDate, ToDate, AutoUpdt, Expand FROM SPP1 WHERE ItemCode = 'A00001'
AND FromDate < GetDate() AND ToDate > GetDate() - 1
When I run this through the DI server, I receive this XML:
<?xml version="1.0"?>
http://www.w3.org/2003/05/soap-envelope">
<env:Body>
<BOM>
<BO>
<AdmInfo>
<Object>oRecordset</Object>
</AdmInfo>
< Date >
<row>
<ItemCode>A00001</ItemCode>
<CardCode>*1</CardCode>
<LINENUM>0</LINENUM>
<Price>372.000000</Price>
<Currency>u20AC</Currency>
<Discount>7.000000</Discount>
<ListNum>1</ListNum>
<FromDate>20080702</FromDate>
<ToDate>20080722</ToDate>
<AutoUpdt>Y</AutoUpdt>
<Expand>N</Expand>
</row>
</ Date >
</BO>
</BOM>
</dis:ExecuteSQLResponse>
</env:Body>
</env:Envelope>
I expected the highlighted tag 'Date' to be SPP1, since that is the table I queried and common convention. In stead, it seemed to look for the nearest FROM and got the next alphanumeric bit. It should look for ' FROM '. I'm now looking for a work-around, but I thought I'd share this with you, guys.
Vincent
Edited by: Vincent van Tongeren on Jul 15, 2008 3:15 PM