Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 11/21/22 in Posts

  1. Fr0sT.Brutal

    Converting C++ API Post Request into Delphi Code

    Universal solution: examine dumps of both requests and look for differences
  2. Neos Eureka s.r.l. is proud to announce our annual Black Friday / Cyber Monday sale! Use our 30% off coupon code when checking out/paying to take advantage of this sale. The code is BFCM2022 Existing customers should log in to their account at: https://www.eurekalog.com/login.php And select the license they wish to upgrade or extend. Enter the code into the coupon field at checkout time. New customers can purchase sale products here: https://www.eurekalog.com/buy.php Enter the coupon code at checkout. The coupon code is valid once per email address. If you have questions or comments then please contact us at: https://www.eurekalog.com/support.php
  3. Lars Fosdal

    Function with 2 return values ?

    Trouble? 😉 I use a record for returning multiple values. Clarity and type safety is of importance to me.
  4. EUR and USD are almost equal right now. I was paid $32k back in 1982. Current salaries are around $100k, and even really cheap Delphi devs are $70k. Full stack web devs are up to $150k. Delphi is a "full-stack" tool, but nobody seems to regard it as such. 🙂
  5. No, but that's in Europe, so you can't compare salaries easily to US salaries, even if you convert EUR to US$. Looks a bit on the low side to me too though, especially for Rome, but I am not that familiar with salaries and cost of living in Italy either.
  6. Hello David Again I don't see the real problem. When you call the API just send a function which parse the parameter TTABSheet and return a tstringlist (or a string or an array). function sendData(MyTab: TTabSheet): tstringList; var comp: TComponent; begin for comp in MyTab do begin if (comp is Tcheckbox) and then Result.add('"' + comp.Name + '":"' + booltostr(Tcheckbox(comp).checked)) +'"' //or other logic else begin // other comp logic; end; end; end; After you just have to add the TstringList.commatext into your JSON Request.
  7. Serge_G

    SQL problem

    Depends of SGBD I think, but if not it's possible to, use Firedac macros 1- This zip contains a SQLite database not a MySQL one as indicated first ! 2- The database contains a really poor lines for testing ! And nothing to do with directories Suggestion for Button2.OnClick uses System.IoUtils; procedure TForm1.Button2Click(Sender: TObject); var FileListe : TArray<String>; i: integer; begin FileListe:=TDirectory.GetFiles(Edit1.Text); for var s: String in FileListe do i:=i+FDQuery1.ExecSQL('INSERT INTO Files(maindirectory) Values (:s)',[S]); Showmessage(i.ToString+' records added'); end; Suggestion for Query procedure TForm1.Button1Click(Sender: TObject); begin FDQuery1.Close; FDQuery1.SQL.Text:='SELECT Maindirectory from files WHERE Maindirectory LIKE &S'; FDQuery1.MacroByName('S').AsRaw:=Quotedstr(Edit1.Text+'%'); FDQuery1.Open; end; As you can see, this also include ability to use macro char % in the like clause value so for MySQL INSTR function, you can set Edit1.Text to '%AEnvoyer' TAKE CARE of SQL Injection with macro usage Ah, yes 👍 so Button2.Onclick can be wrote on different ways procedure TForm1.Button1Click(Sender: TObject); begin // FDQuery1.Close; // By Macro Need FDQuery1.Close and FDQuery1.Open // FDQuery1.SQL.Text:='SELECT Maindirectory from files WHERE Maindirectory LIKE &S'; // FDQuery1.MacroByName('S').AsRaw:=Quotedstr(Edit1.Text+'%'); // By Parameter Need FDQuery1.Close and FDQuery1.Open // FDQuery1.SQL.Text:='SELECT Maindirectory from files WHERE Maindirectory LIKE :p'; // FDQuery1.ParamByName('P').AsString:=Edit1.Text+'%'; // FDQuery1.Open; // By Parameter No Need of FDQuery1.Close and FDQuery1.Open, my preference FDQuery1.Open('SELECT Maindirectory from files WHERE Maindirectory LIKE :p', [Edit1.Text+'%']) ; end;
  8. Solid answer to those who say Delphi is dying - see how Delphi is killing 😄
  9. Anders Melander

    How to 'disconnect' a TFDQuery keeping the datas.

    Read the documentation. Search for FireDAC offline
  10. Uwe Raabe

    Function with 2 return values ?

    Hey, we also have TPair<Double, Double>.
  11. ListView1DeletingItem already deleted the Listview.item[AIndex]. then it comes to ListView1DeleteItem so, here AIndex is always 0, ( guess being reset after the ListItem was deleted). So, we need to get the DB id associated with the ListItem in ListView1DeletingItem event. In this event, we still have the Item and its Tag ...
×