Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
Executing an EDB Procedure from an EWB Module |
Sun, Sep 2 2018 8:06 PM | Permanent Link |
Richard Harding Wise Nutrition Coaching | I have created my first EWB module that performs EDB backups and restores as well as a number of other database and store functions.
What I would really like to do is to execute a procedure. Since the EDB Manager can execute a procedure, it would appear that this must be possible but I cannot work out how to do this from looking at the EDB Manager source. Is it possible to execute an EDB procedure from a EWB module? Richard |
Mon, Sep 3 2018 5:47 AM | Permanent Link |
Uli Becker | Richard,
> Is it possible to execute an EDB procedure from a EWB module? Sure, no problem. 1. Drop a TEDBStoredProc component on your form (for modules always make sure that "AutoSessionName" of the sesson is true, otherwise it would not be thread safe). 2. Assign the procedure name. 3. Add params (maybe passed from your EWB app). 4. Run the procedure and send back the result. e.g.: with MyProc do begin if Prepared then Unprepare; StoredProcName := FName; Prepare; for i := 0 to RequestParams.Count - 1 do MyProc.Params[i].asString := RequestParams.ValueFromIndex[i]; try ExecProc; SendContent(''); except on e: Exception do SendError(HTTP_INTERNAL_ERROR, e.message); end; end; Uli |
Mon, Sep 3 2018 6:56 AM | Permanent Link |
Richard Harding Wise Nutrition Coaching | Great - thank you Uli.
Richard. |
This web page was last updated on Monday, April 29, 2024 at 05:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |