Jump to content

Brian Evans

Members
  • Content Count

    434
  • Joined

  • Last visited

  • Days Won

    6

Brian Evans last won the day on June 10

Brian Evans had the most liked content!

Community Reputation

129 Excellent

Technical Information

  • Delphi-Version
    Delphi 12 Athens

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Set HTTPOptions hoWantProtocolErrorContent. Refs: https://www.indyproject.org/2016/01/10/new-tidhttp-flags-and-onchunkreceived-event/ https://stackoverflow.com/questions/71341467/indy-error-in-delphi-7-undeclared-identifier-howantprotocolerrorcontent
  2. Case seems written for potential customers looking to have something similar done. Not much detailed info of interest to other Delphi developers. Not unexpected as the rest of us could be possible competitors for such work. Still interesting data point for what is being done in regards to modernization of older projects developed with Delphi.
  3. Brian Evans

    what wrong with this function?

    To be a bit more direct - the unit below produces a bunch of errors for function two's definition but its definition is fine when used elsewhere. Can you spot what is wrong? Look hard. unit UnitTest; interface function One : integer; function two : integer; implementation function one : integer; begin one := 1; // end; function two : integer; begin two := 2; end; end.
  4. Brian Evans

    what wrong with this function?

    Putting the function definition inside a Begin / End code block produces the multiple errors posted. So the unit has an open code block where the function definition currently is.
  5. Brian Evans

    what wrong with this function?

    Messed up structure elements can lead to odd errors in others parts of the code. It may look like a block of code is part of a function but due to messed up structure elements it actually isn't. Your first error indicates you are still probably still inside a begin/end code block - the same error is produced by the code below in a simple button click procedure TForm1.Button1Click(Sender: TObject); begin function AddTwo(a,b:integer):integer; end;
  6. Antivirus / security software can mess up debugging. Excluding the IDE (bds.exe) sometimes helps with odd errors that seem to start happening without changes in code or the IDE.
  7. Brian Evans

    TEdit and OnTyping event

    That sounds like the OS/keyboard is retyping content into the edit control. The edit does go back to being empty and then having 1,2,3 etc characters in it just within a short period of time. One thought: keep track of the last partial search string and start/reset a short timer in the OnXXX events. When the timer event triggers check if the edit content is not equal to what was last searched for and update the search as appropriate. This gives time for the OS/keyboard to be done changing the edit contents before you use it's contents in your search.
  8. Brian Evans

    libpq.dll found, but not loaded

    Had time to test it and using 32-bit client binaries from a newer PostgreSQL 32-bit ODBC driver version still works. Tested in a Windows Sandbox with a Delphi test app + binaries from the psqlodbc_15_00_0000-x86 32-bit ODBC driver with postgresql-15.13-3-windows-x64 installed. Test app is just a button that opens a connection and pulls results into a grid. Note clients / client libraries are backwards compatible except for some really old versions. You can use the client binaries from the latest release ODBC driver. Tested this with client binaries from the REL-17_00_0006 32-bit ODBC client and connecting to the 15.13-3 server mentioned above.
  9. Brian Evans

    libpq.dll found, but not loaded

    Windows 10 Home version 1903 or later have the Windows Sandbox as an feature that can be enabled. https://learn.microsoft.com/en-us/windows/security/application-security/application-isolation/windows-sandbox/windows-sandbox-install?source=recommendations Not familiar with Windows 10 Home Single Language and if Sandbox is available as a feature. Worth checking using the above instructions. Could also try an archive utility like 7Zip to extract files from the MSI installer. The Postgres ODBC installer just puts all files in one directory for each version (32-bit or 64-bit).
  10. Brian Evans

    libpq.dll found, but not loaded

    Not actively using PostgreSQL currently but for past use: The PostgreSQL ODBC driver comes in 32-bit and 64-bit versions and uses libpq.dll to connect. It places all the needed files in it's install directories including those it needs form the Microsoft C Runtime Library. Get the ODBC drivers from : https://www.postgresql.org/ftp/odbc/ For version 15 32-bit only that looks like it would be psqlodbc_15_00_0000-x86.zip from https://www.postgresql.org/ftp/odbc/versions.old/msi/ What I would normally do is download the ODBC installer, open a Windows Sandbox, copy and run the installer there. Then look in the appropriate Program Files directory and grab all the needed DLLs from where the ODBC driver was installed.
  11. Brian Evans

    Memo lines{i] to labelv ok. Labels to Memo lines nope

    The Memo could have fewer than three lines in it. If you want to update lines make sure they exist first. while Memo1.Lines.Count < 3 do Memo1.lines.Add('');
  12. I don't lose the HTML body here. 1. Create a formatted draft message. Save as to EML file. 2. Edit the EML file to add the X-Unsent: 1 header. 3. Double click the EML file and it loads in new Outlook as an editable message with HTML formatting intact. The EML file does have two versions of the body - one HTML formatted and one not.
  13. Brian Evans

    TMS TAdvPDFViewer not working on Windows 7 – any workaround?

    Looks like it uses PDF support provided by the OS. So you need another PDF -> image engine/library. ref: https://support.tmssoftware.com/t/tms-vcl-pack-pdfviewer-not-function-on-some-users/24285 https://learn.microsoft.com/en-us/uwp/api/windows.data.pdf.pdfdocument?view=winrt-26100 There is PDFium (https://pdfium.googlesource.com/pdfium/) which is based on the PDF support in Chromium. There are some Delphi components/source that use it - both commercial and opensource. ex https://github.com/ahausladen/PdfiumLib https://winsoft.sk/pdfium.htm Also Developer Express VCL has PDF components as well. Not sure of Windows 7 support but they have a demo you can use to check along with a 30 day trial. Just a bit pricey if not using a lot of the components / functionality they offer. https://www.devexpress.com/products/vcl/pdfviewer/
  14. Brian Evans

    FireDAC getting tripped up with PostgreSQL transactions

    Start with gathering or showing more detailed database exception information. See: https://docwiki.embarcadero.com/RADStudio/Sydney/en/Handling_Errors_(FireDAC) A TFDGUIxErrorDialog that is enabled during debugging can make things a lot easier. Nothing stands out - often if an code block looks clean the error is elsewhere or some assumption being made doesn't hold true.
  15. Brian Evans

    Microsoft Trusted Signing service

    I don't see a certificate with that name here: https://www.microsoft.com/pkiops/docs/repository.htm There is one named microsoft identity verification root certificate authority 2020. Seems a redundant "Enterprise" has been added in some references confusing things. I believe they both refer to the same underlying certificate. The certificate should be automatically installed by Windows if it's connected to the Internet. Ref bottom of: https://support.microsoft.com/en-au/topic/kb5022661-windows-support-for-the-trusted-signing-formerly-azure-code-signing-program-4b505a31-fa1e-4ea6-85dd-6630229e8ef4
×