![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
![]() |
Fri, Apr 25 2014 5:05 AM | Permanent Link |
Paul Waegemans IMS bvba | At designe time I've made a query as follows:
SELECT * FROM SEMINARIESDETAIL WHERE inschrijven=true AND datum>={datum='2014-01-01'} ORDER BY datum ascending at runtime I do the following: v_testdatum:=DateToStr(date,false); /// through a showmessage(v_testdatum) I can see that the date in v_testdatum is correct /// with SeminarsToCome1 do begin params.clear; Params.Add('inschrijvingen=true'); Params.Add('datum>='''+V_testdatum+''''); end; but the query is still working with the date that was set at design time and is also showing the seminars with date less than v_testdatum Any suggestion? |
Fri, Apr 25 2014 6:15 AM | Permanent Link |
Chris Holland SEC Solutions Ltd. ![]() | Hi Paul,
Is the line : WHERE inschrijven=true actually a parameter, it looks like a hard coded "true" value to me. If this is the case then your parameter counts will be out when entering your date values. Chris Holland [Team Elevate] On 25/04/2014 10:05, Paul Waegemans wrote: > At designe time I've made a query as follows: > > SELECT * FROM SEMINARIESDETAIL > WHERE inschrijven=true > AND datum>={datum='2014-01-01'} > ORDER BY datum ascending > > at runtime I do the following: > > v_testdatum:=DateToStr(date,false); > /// through a showmessage(v_testdatum) I can see that the date in v_testdatum is correct /// > > with SeminarsToCome1 do > begin > params.clear; > Params.Add('inschrijvingen=true'); > Params.Add('datum>='''+V_testdatum+''''); > end; > > but the query is still working with the date that was set at design time and is also showing the seminars with date less than v_testdatum > > Any suggestion? > |
Fri, Apr 25 2014 6:27 AM | Permanent Link |
Matthew Jones | > Params.Add('inschrijvingen=true');
> Params.Add('datum>='''+V_testdatum+''''); The first value name doesn't match your query name. The second one has the condition in, and I think should just be '=' not the >=. I ponder the added quotes too, but don't use this part so not sure. /Matthew Jones/ |
Fri, Apr 25 2014 7:02 AM | Permanent Link |
Paul Waegemans IMS bvba | Hello Matthew,
Hello Chris, Changing the code as Chris suggested with SeminarsToCome1 do begin params.clear; Params.Add('datum>='''+V_testdatum+''''); end; = result remains the same! "inschrijvingen=true" is indeed not a parameter and there is no need to treat it as a parameter of course. SOLUTION: removing > as Matthew suggested gives the correct result. Logic of course because we are only sustituting the value of the date. MANY THANKS. Sometimes you are to close to see what you are doing wrong. Paul. (Matthew Jones) wrote: > Params.Add('inschrijvingen=true'); > Params.Add('datum>='''+V_testdatum+''''); The first value name doesn't match your query name. The second one has the condition in, and I think should just be '=' not the >=. I ponder the added quotes too, but don't use this part so not sure. /Matthew Jones/ |
Fri, Apr 25 2014 8:42 AM | Permanent Link |
Uli Becker | Paul,
your "date" syntax is not correct for EDB, please see this post: http://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&page=1&msg=4364#4364 You have to "declare" the string as date. Uli |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |