Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
(ParamByName Field and Data) how to |
Thu, Jul 20 2006 7:17 AM | Permanent Link |
Aaron Taylor | can you use parambyname for both the field and data ?
like SQL.Add('UPDATE database SET boolfield = True'); SQL.Add('WHERE :ffield LIKE :ffilter'); ParamByName('ffield').AsString:='MyField'; ParamByName('ffilter').AsString:='hello'; ExecSQL; |
Thu, Jul 20 2006 8:21 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Aaron,
<< can you use parambyname for both the field and data ? >> Unfortunately, no. The best way to remember this is to think of parameters as being the same as constant values. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jul 26 2006 5:04 PM | Permanent Link |
adam | Aaron,
When I want to do this I write the SQL with %s and use the FormatString routine of Delphi ... it works wonderfully i.e. SELECT ID, %s, %s FROM Customer WHERE AddressCity = "London" Could be the SQL I have a TDBISAMQuery decendent with a "ReplaceStringParams" method. I can call this to shunt values into the SQL. Note that this even allows dynamic changing of TableNames, or of parameters within IF statements within the SQL. I find it really useful. Adam |
This web page was last updated on Saturday, May 4, 2024 at 09:18 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |