Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 02/01/21 in Posts

  1. Nothing needs to be fixed. StringReplace is giving correct output, isn't it? You absolutely don't want to be calling Pos inside an efficient implementation of StringReplace. All that you are learning is that StringReplace is not efficiently written. The correct way to deal with that is to find/write and use a more efficient function to replace text. That is of course if this is a bottleneck in your code. Have you checked? BTW, do you really have calls to Pos littered through your code whenever you call StringReplace?
  2. I never understood the benefit of writing the ExplicitLeft / Top / Width / Height properties for TControl and descendants, which were added in Delphi 2007, to the dfm files. They store the control’s position and size before its Align property was set to something like alClient or alRight, so they can be restored later. That’s useful if you change these by accident or double click on the Align property to go through the possible values, but as soon as you save the form, you don’t really need them any more. Even worse, they seem to change often with no apparent reason and therefore clutter a dfm file’s diff with changes that nobody is interested in. read on in the blog post
  3. Not sure it is needs a "fix". pos is case sensitive. A different function would be needed, depending on the value of the flag parameter. Same version.
  4. jonnyg

    Are there any free DBGrid components out there?

    Mike Shkolnik at scalabium.com has a freeware dbGrid. As I recall, it's part of a larger freeware component package.
  5. david_navigator

    Hashing Street Addresses ?

    Thanks for all the replies and suggestions. Just went for a walk with the dog and realised that I don't need the address info at all, I can index the other data fields (5 x integers) to find the record I need 🙂 Amazing how doing something different often brings alternative solutions to the forefront.
  6. joachimd

    Sql Delete

    DELETE FROM MDETAIL WHERE ID IN (SELECT ID FROM MDETAIL MD JOIN ITEMS IT ON MD.ITEMNO=IT.ITEMNO WHERE MD.RNO=120 and IT.ITEMTYPE ='001'); If you don't have a unique ID value, maybe your dbms has (rowid).
×