![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 11 to 14 of 14 total |
![]() |
Tue, Jul 25 2017 9:58 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Richard,
<< The dataset, is SQL as follows: >> That's not correct. You can't use quotes around parameter names (they also shouldn't contain spaces): SELECT * FROM PWReadings WHERE CAST("_created" AS DATE)=DATE {SearchDate} (Notice the space after the DATE keyword) << and I pass in a parameter, within EWB such as: >> That's also wrong. DateToStr is going to, by default, give you a date that is formatted for EWB client applications in the form of 'M/d/yyyy'. That is no good for a date literal for EDB, which expects an ANSI date format of 'yyyy-M-d'. Tim Young Elevate Software www.elevatesoft.com |
Wed, Jul 26 2017 10:04 AM | Permanent Link |
Richard Mace | Tim Young [Elevate Software] wrote:
<< and I pass in a parameter, within EWB such as: >> << That's also wrong. DateToStr is going to, by default, give you a date that is formatted for EWB client applications in the form of 'M/d/yyyy'. That is no good for a date literal for EDB, which expects an ANSI date format of 'yyyy-M-d'.>> OK, I've now got the following error: "Expected Date Constant but instead found 2017" after adjusting the EWB code to: iYear := YearOf(SearchDate,True); iMonth := MonthOf(SearchDate,True); iDay := DayOf(SearchDate,True); sSearchDate := IntToStr(iYear) + '-' + IntToStr(iMonth) + '-' + IntToStr(iDay); DS.Params.Add('SearchDate=' + sSearchDate); Any further pointers? Thanks Richard |
Wed, Jul 26 2017 12:05 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Richard,
<< OK, I've now got the following error: "Expected Date Constant but instead found 2017" after adjusting the EWB code to: >> Date constants in SQL need to be surrounded with single quotes: DS.Params.Add('SearchDate=' + QuotedStr(sSearchDate)); Tim Young Elevate Software www.elevatesoft.com |
Thu, Jul 27 2017 7:19 AM | Permanent Link |
Richard Mace | Tim Young [Elevate Software] wrote:
<< Date constants in SQL need to be surrounded with single quotes: DS.Params.Add('SearchDate=' + QuotedStr(sSearchDate)); >> Thanks Tim. That's sorted it ![]() Richard |
« Previous Page | Page 2 of 2 | |
Jump to Page: 1 2 |
This web page was last updated on Thursday, April 3, 2025 at 06:55 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |