Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 3 of 3 total |
parameters in script |
Thu, Feb 15 2007 6:31 AM | Permanent Link |
"Harry de Boer" | dbIsam 3.3. D6
LS When executing a SQl script is it correct that parameters only work in the first statement? The script and code below doesn't work because the ot parameter doesn't seem to work. How to overcome this (in SQL -I know I can filter the result, but I want to fetch the right result right away)? Regards, Harry q.Close; q.ParamByName('d1').AsDateTime := d1.DateTime; q.ParamByName('d2').AsDateTime := d2.DateTime; q.ParamByName('ot').AsString := lookupcombo.Text; q.Open; select distinct id_object into memory temp from objecten, contractregels where objecten.id_object = contractregels.id_object_artikel and ( datum_van <= :d2 and datum_tot >= :d1) ; select distinct id_object from objecten where id_object not in (select * from memory temp) and verhuurobjecttype = ; |
Thu, Feb 15 2007 7:32 AM | Permanent Link |
"Robert" | "Harry de Boer" <harry@staaf.nl> wrote in message news:6AA38805-4791-41F6-9D06-A5AE13FEE018@news.elevatesoft.com... > dbIsam 3.3. D6 > > LS > > When executing a SQl script is it correct that parameters only work in the > first statement? The script and code below doesn't work because the ot > parameter doesn't seem to work. How to overcome this (in SQL -I know I can > filter the result, but I want to fetch the right result right away)? > Run two queries, or do a stringreplace on query.text replacing '' with the value. If you run two queries, don't forget to close the first one to allow access to the memory table. Robert |
Thu, Feb 15 2007 10:21 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Harry,
<< When executing a SQl script is it correct that parameters only work in the first statement? The script and code below doesn't work because the ot parameter doesn't seem to work. How to overcome this (in SQL -I know I can filter the result, but I want to fetch the right result right away)? >> In version 3.x, yes. In 4.x you can supply different parameters for each statement. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |