![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 2 of 2 total |
![]() |
Sun, Mar 6 2016 8:43 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | I'm in the process of adding an extra function to my subclassed query
procedure TnlhQuery.AdjustParameters; var Cntr: integer; begin if FTruncate or FRTrimStrings or FNullEmptyStrings then begin for Cntr := 0 to ParamCount - 1 do begin if Params[Cntr].DataType = ftString then begin if not Params[Cntr].IsNull then begin if FRTrimStrings then Params[Cntr].AsString := TrimRight(Params[Cntr].AsString); if FNullEmptyStrings then if Params[Cntr].AsString = '' then Params[Cntr].Clear; if FTruncate and (Params[Cntr].Size > 0) and (Length(Params[Cntr].AsString) > Params[Cntr].Size) then Params[Cntr].AsString := Copy(Params[Cntr].AsString, 1, Params[Cntr].Size); end; end else if Params[Cntr].DataType in [ftMemo, ftFmtMemo] then begin if not Params[Cntr].IsNull then begin if FRTrimMemos then Params[Cntr].AsString := TrimRight(Params[Cntr].AsString); if FNullEmptyStrings then if Params[Cntr].AsString = '' then Params[Cntr].Clear; end; end else if Params[Cntr].DataType in [ftBlob, ftGraphic] then begin if (not Params[Cntr].IsNull) and FNullEmptyStrings and (Params[Cntr].AsString = '') then Params[Cntr].Clear; end; end; end; end; I set the size property and ElevateDB works out the type so I thought I didn't need to set that up, but unless I specify ftString for the datatype the size parameter is being set back to 0. Is this WAD? Roy Lambert |
Mon, Mar 7 2016 8:33 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Roy,
<< I set the size property and ElevateDB works out the type so I thought I didn't need to set that up, but unless I specify ftString for the datatype the size parameter is being set back to 0. >> EDB doesn't handle the parameters functionality (TParams), they are handled by the DB unit in Delphi. The only thing EDB does is initially populate/update them after a SQL text assignment or prepare. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, August 14, 2024 at 03:12 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |