![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
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 ![]() | 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. ![]() | 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 Thursday, July 10, 2025 at 01:54 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |