Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 7 of 7 total |
Prepare/Unprepare |
Mon, Sep 22 2008 12:30 PM | Permanent Link |
UliBecker | I am using this code to prepare a query:
with dm.PRPatientenQuery do begin sql.add('select * from Patienten where PatientenID in'); sql.add('(select PatientenID from Anforderungen where Ambulant = :Ambulant)'); prepare; end; When executing the query like this: with dm.PRPatientenQuery do begin close; ParamByName('Ambulant').asBoolean := true; open; ShowMessage(inttostr(dm.PRPatientenQuery.recordcount)); close; ParamByName('Ambulant').asBoolean := false; open; ShowMessage(inttostr(dm.PRPatientenQuery.recordcount)); end; the result is the same with both parameters (true and false), though it shouldn't. close; unprepare; works. Have I really to unprepare the query each time? If so, what is the sense of preparing it? Regards Uli |
Tue, Sep 23 2008 8:07 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< the result is the same with both parameters (true and false), though it shouldn't. >> I'll have to check this out. You should only need to prepare it once. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Sep 24 2008 11:04 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< the result is the same with both parameters (true and false), though it shouldn't. >> I can't reproduce this here. I'm getting one row with one (True) and zero rows with the other (False), which matches the test data that I've put in place. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Sep 24 2008 12:53 PM | Permanent Link |
UliBecker | Tim,
<< I can't reproduce this here. I'm getting one row with one (True) and zero rows with the other (False), which matches the test data that I've put in place. >> I'll try to send you the data I am using and the query to reproduce that. Regards Uli |
Fri, Sep 26 2008 6:03 AM | Permanent Link |
UliBecker | Sample sent by mail.
Uli. |
Fri, Oct 3 2008 6:00 PM | Permanent Link |
Uli Becker | Tim,
any news concerning this thread? Regards Uli |
Mon, Oct 6 2008 12:06 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< any news concerning this thread? >> Sorry, yes, you are correct. There is an issue when using an IN sub-select with a parameter combined with an insensitive result set. The second execution after changing the parameter will result in the same rows being returned. A fix will be in 2.02. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, April 27, 2024 at 08:52 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |