Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
Clearing parameterised query |
Wed, Oct 28 2009 8:37 PM | Permanent Link |
Peter | Hello
In DBISAM, I used code similar to this to clear a parameter... if NOT mData.FieldByName('BankBranch').IsNull then AQuery.ParamByName('BranchP').AsString := mData.FieldByName('BankBranch').AsString else begin AQuery.ParamByName('BranchP').DataType := ftString; AQuery.ParamByName('BranchP').Clear; end; That code still works in EDB, but is it _necessary_ to include the DataType in EDB? I have used AQuery.ParamByName('BranchP').Clear (without the begin\end and DataType line), and it works Ok, but I am unsure as to whether or not it is a good idea. Regards & TIA Peter |
Thu, Oct 29 2009 5:15 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Peter
AFAIK .Clear works on any datatype. If you trace it back you get procedure TField.Clear; begin if FieldKind in [fkData, fkInternalCalc] then SetData(nil); end; Roy Lambert [Team Elevate] |
Thu, Oct 29 2009 6:53 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Peter,
<< That code still works in EDB, but is it _necessary_ to include the DataType in EDB? >> Not after a Prepare, no. EDB automatically discovers and sets the parameter data types, whereas DBISAM did not. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |