Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral

Recent Profile Visitors

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

  1. Wloochacz

    Database app good practice

    I'm sorry, do you know this project? https://github.com/grijjy/MvvmStarterKit It is not pure MVC, but MVVM Here full approval, DMVC (https://github.com/danieleteti/delphimvcframework) is not a project for VCL/FMX applications. And yes and no. Please note that FMX is also not TDataSource oriented, it does not have DBAware controls known from VCL (e.g. TDBEdit) and instead LiveBinding mechanism is used. And in case of MVVM it can work very similarly. In my opinion, RAD is no one's friend and this friendship turns into hatred when the project is bigger and bigger... And it gets older and older, and it needs to be developed. After all, for decades we have been convinced that RAD is great! For everything! Just, it's bullshit.
  2. Wloochacz

    TFDMemTable - how to clear structure?

    Hello Jaca! :) There is no simple solution for that. However, I would suggest basing your own solution on the CopyDataSet code. Note that if you specify the coStructure parameter in the options of CopyDataSet method, you will get what you want. Almost ;-)
  3. Wloochacz

    How to Code SQL IN Statement correctly

    In general, this is true, especially in SQL executed on the server side, such as stored procedures, triggers, etc. And there, it's better to write like this: select A.* from foo1 A inner join foo2 B on (A.ID = B.ParentID) instead of this: select A.* from foo1 A where A.ID in (select B.ParentID from foo2 B) Although the result will be identical. However, in some cases it is simply convenient. For example, in my application I pass an array of PrimaryKey values to ReportManager so that he can ask the server for the data he has selected on the list. It works like this: And where in SQL looks like this: where TD.IdDevice in (10,12,16,23) Simply clever :P
  4. Wloochacz

    How to Code SQL IN Statement correctly

    In e.g Firebird database, yes. In MS SQL it does not matter.
  5. Wloochacz

    How to Code SQL IN Statement correctly

    Indeed, but OP work with SQL Server. And this database has no such limits
  6. Wloochacz

    How to Code SQL IN Statement correctly

    Use the macro! 😉 fQ.SQL.Text := 'SELECT * FROM tTableName WHERE Status IN (!InValues) ORDER BY EventDate'; fQ.MacroByName('InValues').AsRaw := '''S'', ''R'''; fQ.Open;