Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Incident Reports » Incident Reports Addressed for Version 3.02 » View Incident Report |
Serious |
Reported By: Ralf Mimoun Reported On: 8/17/2023 For: Version 3.02 Build 8 |
This is the code that works, cooked down: dsFahrauftrag.Params.Values['Fahrauftrag_Nummer'] := IntToStr(FahrauftragNummerAsInt); dsFahrauftrag.Open; try dsFahrauftrag.LoadRows; if dsFahrauftrag.RowCount = 0 then begin Application.Request.SendError(HTTP_NOT_FOUND, Format('Unknown Entity "%s"', [FahrauftragNummer])); end else begin Application.Request.SendContent('Got it'); end; finally dsFahrauftrag.Close; end; except on E2: Exception do begin Application.Request.SendError(HTTP_INTERNAL_ERROR, E2.StackTrace + ': ' + E2.Message); end; end; Nothing fancy. Now, put a "exit;" right after the first "Application.Request.SendError": ... if dsFahrauftrag.RowCount = 0 then begin Application.Request.SendError(HTTP_NOT_FOUND, Format('Unknown Entity "%s"', [FahrauftragNummer])); exit; end ... Then, you get a second resonse from the E2 part, saying Error 500: Exception instance raised in unit WebData at 2517,4 TDataSet.Close in unit Main at 109,21: Value conversion error Something goes totally wrong with an exit; in this try/except block, killing the .Close method.
This web page was last updated on Tuesday, April 23, 2024 at 08:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |