Jump to content

Tom Chamberlain

  • Content Count

  • Joined

  • Last visited

Community Reputation

36 Excellent

About Tom Chamberlain

  • Birthday December 24

Technical Information

  • Delphi-Version
    Delphi 11 Alexandria

Recent Profile Visitors

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

  1. Tom Chamberlain

    Help to find database error

    The problem is the procedure is declared to a class that does not exist: Should be: procedure TfrmDatabaseTutorial.ShowSelectResults();
  2. Tom Chamberlain

    Project Options -> Version Info aka. dproj madness

    We use a set of shared resource files, one for the EXE's and another for the DLL's (the filetype changes) and leave the IDE out of it. We have our own mass build process for production (the only time we care about the version numbers and things) with the option to update the version number, it changes and rebuilds the resource files before starting any compiles so we always have the correct versions for production.
  3. Tom Chamberlain

    Trap TFDConnection error on data module create etc?

    No, not just for that feature I really like the component naming, renaming and replacement features. Makes migrating/upgrade older projects faster and the Tab Order as a tree saves time.
  4. Tom Chamberlain

    Trap TFDConnection error on data module create etc?

    We prevent this issue with GExperts -> Set Component Properties and having it set the Active and Connected properties to False on all DB components before compiling. It does it automatically so we don't have to remember to do it 🙂 One of the best features of GExperts for us.
  5. Tom Chamberlain

    Backup of files + mysql

    Your joking right? Is your database so large that it is not in a virtual server (hopefully on redundant hardware) with at least some sort of enterprise backup solution at a VM level? Is the client so small or so cheap they do not understand this is not a software vendors job? This sounds like a 'sales job' making you to come up with a solution for a non-problem or a completely incompetent IT service. I am betting on the latter. Sarcasm: Tell them they need an SAS 18TB LTO tape drive attached to the server and something old-school like Restrospec or Backup Exec installed on the server for file-level backups and about 10-12 hours of down time each night to do the backups. Don't forget to include someone has to swap that tape every day and they will need at least 100+ tapes for daily's, weekly's and monthly offsite storage. Maybe you should offer to pickup the backups every morning and keep them safe offsite for them, for a extra fee of course. Sorry I slipped into a 1990's rant there, just glad I do not have to deal with this type of thing anymore. Not making fun of anyone who still has to deal with tape backups I know their value to large organizations and disaster recovery plans.
  6. Tom Chamberlain

    Feedback Request - FastReports vs ReportBuilder?

    We have also been using ReportBuilder Enterprise for 15+ years since QuickReports was not capable of somethings we wanted to do so many years ago. 100's of reports later and that doesn't count the 'End User' reports the users have created themselves. When COVID hit switching to emailing reports and invoice's saved so much time and paper, we have gone paperless and are not going back. We have not had any performance issues (that were not self-inflicted) and when we have had technical issues, support is fast and responsive with patches. I would also recommend ReportBuilder.
  7. Tom Chamberlain

    Good book about FireDAC

    Cary Jensen has a book that is pretty good, https://www.amazon.com/Delphi-Depth-Cary-Jensen-Ph-D/dp/1546391274
  8. Tom Chamberlain

    Problems with Delphi class structure / visibility

    The one thing no one has pointed out: Unit1 TClass1 PropertyA Unit2 Uses Unit1 {the unit name, not the class inside the unit name} Another useful link is https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Programs_and_Units_(Delphi)
  9. Tom Chamberlain

    Message Broker??

    If you own D11.3 Enterprise or Architect and all your apps are Delphi then you can create your own solution with DataSnap. You can use the TDSClientCallbackChannelManager to register client applications with a DataSnap server. Your client applications make function/procedure calls to the DataSnap server using regular types and classes to do what you want, DataSnap will do all the marshalling for you both ways. We use such processes to track concurrent usage with a 'user' object we pass that contains user name, machine name, IP, database they are connected to, etc. We have created our own 'message' structure that allows us to send notifications to individual clients or all registered clients via the callback or issue 'commands' to the clients to close the application gracefully if the user forget to logout at the end of the day. The callback from the server sends a TJSONValue so you can build a simple or very complex message architecture. (Interacting with the client GUI requires some TThead.Queue calls but this will be true of any solution) If your apps use multiple languages then something like ActiveMQ, ZeroMQ, RabbitMQ, etc. would be a better solution, but if your apps are all Delphi you may already have the tools/tech you need. That said, if you have more than 5,000 active clients I would not use DataSnap, but look for something that scales better than DataSnap. We are small and only have 20-30 active clients at most so DataSnap is a simple and flexible solution for us.
  10. Tom Chamberlain

    D11 Update 1 + FireDAC + ODBC to Sage returning wrong data!

    Interesting, we only call CoInit/CoUnInit in new threads before/after new connections are created/freed, never in the main (GUI) thread which has DB queries and data-aware components (to many, but 20+yr old code) but only one shared DB connection for the GUI in a data module. But every thread inside services get CoInit/CoUnInit's. We have only ever used M$/SQL, used the BDE for the first 5yrs and switched to ADO in 2003 or 2004 which has be sufficient for our needs until changes to M$/SQL date field types have forced us to make the switch to FireDac and the latest ODBC SQL drivers. We have had some learning pain's with FireDac but nothing like theses issues.
  11. Tom Chamberlain

    One place to rule them all???

    In our 24+ year old system we have a central TDataModule with the connection and shared data access for things used everywhere like customer information retrieval. Then each form has form specific queries/datasets/command and datasource components dropped on them (no tables) for the form related data. We don't have a sea of DB components on most forms, but if I could go back 25 years knowing what I know now, I would do it all through objects and/or use some type of ORM and have no DB components anywhere. Now, where is my Tardis?
  12. Tom Chamberlain

    A book about Object Pascal Style Guide

    +1 for the Run Lola Run reference....Manni!!!!
  13. Tom Chamberlain

    Need a "Delphi programming guideline"

    Do not waste your time, find a new job and leave them in the past. Got reprimanded once for replacing 2000+ lines of code looking for values by doing 'if Edit1.Value = x' on about 200 edit boxes basically named Edit1, Edit2, Edit3..Edit200 on a form (don't ask), just a huge cut-paste, change the component name procedure. I reduced it to about 10 lines using FindComponent in a loop producing the same results. I walked out of that job in less than 1 month after I figured out they (staff and management) refused to learn anything new. Do not suffer fools.
  14. It works better if you can break it down and use a key for the child objects also: TChildList = TObjectDictionary<UniqueKey, TMyClass>; MyList: TObjectDictionary<String, TChildList>; UniqueKey is a priority/sequence number in our system for each unique child, we use an integer. This makes searching and processing child objects simple. var localChild: TMyclass; if MyList.ContainsKey(SearchString) then for localChild in Mylist[SearchString].Values do begin localChild.....whatever end; and if MyList.ContainsKey(SearchString) then if MyList[SearchString].ContainsKey(UniqueKey) then begin localChild := MyList[SearchString].Items[UniqueKey]; localChild...whatever end;
  15. Tom Chamberlain

    Close application during form create??

    I thought there was a problem with skipping the Application.Run, that is why the call to Application.Terminate is in there. It puts the terminate message on the que and the Application.Run processes it correctly and you get a clean exit. My 'DoWeShowTheForm' actually is a splash screen with login prompt from a dynamically loaded DLL so maybe that is why I did it with the Application.Terminate, it has been many years ago since that was written. I did try it without the terminate and skipping the run and it does work, FastMM did not report any issues, but I still put the terminate back in