Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/03/24 in Posts

  1. PeterPanettone

    Switching off automatic Bookmarks?

    Several MMX actions automatically set Bookmarks in the source code or even set a mark where the ESC key jumps to another position in the source code. I find this extremely disturbing. Where can I switch this OFF?
  2. You should not need to add the .pas file, just enable Debug DCUs instead, then you can step into the RTL's source code. Are you compiling for 64bit? Do you have all patches installed? Inspecting Delphi variables in C++ is a known issue. Hard to say without knowing what the true value of LSize is. Sounds more like LSize may be 0-2 bytes to begin with. That is pretty large for a 200 reply. Most servers just send an "OK" text. What does the raw response line actually look like on the wire? That should not be possible. If the specified length is greater than 0 then memory is guaranteed to be allocated or an exception thrown on failure. Personally, I would not have coded it the way they did. If WinHTTP asks for a buffer allocation then I would just make the 2nd API call unconditionally after allocating the requested memory. It looks like they are trying to ignore the case where the text is empty (just a null terminator), in which case they should have tested the requested LSize before allocating the memory. But that is just me. That attachment can't be found.
  3. One thing to note - ReadHeaders() calls WinHttpQueryHeaders(), but WinHttpQueryHeadersEx() is documented as not accepting WINHTTP_QUERY_STATUS_TEXT, so maybe Microsoft made an update that affects WinHttpQueryHeaders() similarly and didn't document it? Just guessing. What does that have to do with retrieving the status text? It doesn't come from those headers.
  4. So, what happens if you (debug)trace into that ReadHeader? On what line does it 'crap' out? Do you get a ERROR_WINHTTP_HEADER_NOT_FOUND in that function? Do your response-headers contain a Content-Length? If not... is your input/response chunked? (that could be the cause of HEADER_NOT_FOUND) Is this happening with one certain URL or with all/more URLs?
  5. egnew

    FireDac PostgreSQL Parameters

    Thanks very much Brian. You have been very helpful. Everything I need is working. This issue is resolved. Thanks for the assistance.
  6. Brian Evans

    FireDac PostgreSQL Parameters

    Postgres limitation - no multiple statements in a prepared query (queries must be prepared if they use parameters). Note a single statement runs in a transaction anyway so the begin;/end; are not needed in the example. Most use stored procedures in the database when there is a need to execute multiple statements based off passed in parameters. Some use DO and pass in the contents of a stored procedure body as a string to run as an anonymous code block but then you can't pass in any parameters.
  7. Brian Evans

    FireDac PostgreSQL Parameters

    In Postgres BEGIN needs to be followed by a semicolon. It is equivalent to some other databases START TRANSACTION. It should be paired with a COMMIT and not END. Ref: PostgreSQL: Documentation: 17: 3.4. Transactions Single statements usually run as a transaction anyway - either the whole statement executes or none of it does. So, for a single statement your SQL would just be: update mytable set testno = testno + :increment where id = 1;
  8. Vincent Parrett

    Meta-Delphi question about web hosting..

    My preferred stack for web dev is asp dotnet for the back end and React for the front end. If you must use delphi - https://github.com/danieleteti/delphimvcframework would be a good option for the back end. I hadn't looked at it in a long while, but it's come a long way in the last few years. asp dotnet and delphi mvc have a ton of functionality which scale really well. I steer clear of asp dotnet for the UI part because it changes too often and updating applications becomes a major task (ask anyone who updated from asp.net 4.x to asp dotnet core). On the front end, you could use what ever web ui framework you want, React, Vue and Svelte are all good options - but they all come with a learning curve.
  9. David Schwartz

    Meta-Delphi question about web hosting..

    If you've ever seen a FOREX dashboard built in Delphi running on a high-speed link, you wouldn't be asking these questions about whether it's possible. Yes, it absolutely is. What problem are you REALLY trying to solve? Also, shopping carts are DESIGNED to be STATIC, so they're an inappropriate example. Stock, bond, and FOREX trading are examples of HIGHLY dynamic apps, and Delphi has been used to build all of them.
  10. Uwe Raabe

    Switching off automatic Bookmarks?

    In MMX Code Explorer properties look in General-Searching and History.
×