Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 11/13/21 in all areas

  1. Hi Team, I fudged it with D10 but I'm not sure I did it the best way. So what is the best way to replace/isolate the D11 installed/distributed Indy with latest Git Indy? I would prefer NOT to delete any of the installed/distributed Indy but if I must... Regards & TIA, Ian
  2. Serge_G

    Firebird-Create Procedure

    Use SET TERM SET TERM $ ; CREATE PROCEDURE CUSTITEMMOVEMENT ( CUSTNO INTEGER ) RETURNS ( RNO INTEGER, TNAME VARCHAR(5), TDATE DATE, DOCNO VARCHAR(12), QTY NUMERIC(18, 2), NETPRICE NUMERIC(18, 4), ITEMNO VARCHAR(20), ITEMNAME VARCHAR(40) ) AS BEGIN FOR SELECT IM.RNO,IM.TNAME,IM.TDATE,IM.DOCNO,IM.QTY, IM.NETPRICE,IM.ITEMNO, IT.ITEMNAME FROM ITEMMOVEMENTS IM JOIN ITEMS IT ON IT.ITEMNO=IM.ITEMNO WHERE (IM.CUSTNO= :CUSTNO) ORDER BY IM.TDATE, IM.DOCNO INTO :RNO,:TNAME,:TDATE,:DOCNO,:QTY,:NETPRICE,:ITEMNO,:ITEMNAME DO SUSPEND; END $ SET TERM ; $ By the way, don't use quotation marks except if you want columns names to be case-sensitive and, for purpose of maintenance I suggest you not to name your columns xxxNO if type is not a number
  3. Remy Lebeau

    EIdConnClosedGracefully error..

    The only way that can happen is if the HTTP server is closing its end of the TCP connection prematurely before the end of the response has been sent. If the server wants to use a disconnect to signal end-of-response (which is a valid use-case), it has to indicate that up-front in the HTTP response headers, in which case TIdHTTP would simply handle the disconnect internally and your code would not see this error. So, the only way this error can reach your code is if the disconnect is unexpected. No, you don't need to do that in this case, since you are destroying the TIdHTTP object after sending a single HTTP request. That earlier advice only applies if you were reusing the TIdHTTP object for sending multiple HTTP requests. And even then, under ideal conditions, you still should not need to manually disconnect and clear the buffer, TIdHTTP should be handling that internally for you. Also, your CheckUrl() appears to be unnecessary. Just request the URL unconditionally, and handle any errors it may raise.
  4. Remy Lebeau

    Image attachment in a html email??

    Yes. TIdAttachment is an abstract base class in Indy 10, it has no such constructor. You are looking for TIdAttachmentFile instead. I suspect the code you are trying to compile is actually meant for Indy 9, not 10. In Indy 9, TIdAttachment was a concrete class that only supported files. TIdAttachment was redesigned in Indy 10 to be a base class with new descendants introduced (TIdAttachmentFile, TIdAttachmentMemory, etc). Also, the structure of your email is not setup correctly for HTML, with images. The article Lajos linked to explains in detail how it should be setup. And Indy has a TIdMessageBuilderHtml class to help with this task, see https://www.indyproject.org/2008/01/16/new-html-message-builder-class/
×