Gotchas when using Delphi Update

Rad Studio Delphi Development, Software development Concepts
Sometimes when you are programming using Embarcadero Delphi you will come up with a few Gotchas. These are not bugs but more as a pain. Initially you create an application in a debug mode while you are testing the code. You have a icon for the application making it look professional and just go to the release state. The icon may or may be what you expected. Your debug application has the correct icon but your release doesn't. Pretty strange but Windows keeps an icon cache. The simple thing would be to rename your executable and suddenly it looks good. You wonder why Windows would do that ? It is Windows and you have to live with that. Click on this link to see what else you can do to…
Read More

How to restart a VCL Delphi application while using a Mutex

Rad Studio Delphi Development
How to restart a VCL Delphi application while using a Mutex. This article puts all of the research in one single page. Using a mutex prevents multiple application instances from occurring. You may wonder why would you wish to restart an application. It doesn't mean there was a software defect in the code. Application settings have changed. What is a mutex A mutex object is a synchronization mechanism designed to ensure mutually exclusive access to a single resource that is shared among a set of kernel-mode threads. Using a mutex can ensure that there is only one instance of your application executing. A unique name should be used when starting the application. The simplest way is to use your application name and/or a shorten name that would be unique when…
Read More

Terminating an Application when using Delphi

Rad Studio Delphi Development, Software development Concepts
Sometimes there are reasons to terminate an application due to unforeseeable issues and there has been a lot of talk how to handle this event. Let's go over a simple application and break down what needs to be done. Go to the code The initial code opens up a splash screen, displays it and finally releases it after a few moments. Splashscreen.Show; Splashscreen.Update; Sleep(2000); Splashscreen.Free; Application.Initialize; The application defaults are set with the title and the help file as well as creating the data module along with the login screen. Application.DefaultFont.Name := 'Arial'; Application.MainFormOnTaskBar := True; Application.Title := 'Application Name'; Application.HelpFile := ExtractFilePath(Application.ExeName) + 'Help.CHM'; Application.CreateForm(TDM, DM); Application.CreateForm(TfrmLogin, frmLogin); The application at this point will open up the login screen allowing the user to enter their information. The license is…
Read More

Microsoft SQL Server how to get a table size

SQL Tips
Microsoft SQL Server how to get a table size Sometimes you need to get the size of a particular table located in a database within the Microsoft Server and the following query can provide you that.  You can run this manually or place it in a stored procedure for numerous tables. The SQL code {{CODE1}} Looking at the actual code it displays the name of the table, schema name, record count (rows), size and additional information pertaining to the space used or not used. This is a nifty way to quickly view which tables are large and growing.  This provides analysis on the database giving a SQL admin a method to adjust what could happen in the future. You can also place this in your source code to call the…
Read More

CommunityToolbar in Delphi creates problems

Rad Studio Delphi Development
CommunityToolbar in Delphi creates problems The CommunityToolbarXXX.BPL located in your C:\Program Files (x86)\Embarcadero\Studio\XX.0\Bin creates problems for the IDE in the long run.  Apparently you can get an access violation when closing the IDE or if you click on tools\options followed by Ok you can get a script error using Tokyo.  The XXX is the version number located in the BIN folder.  For Berlin it was 240 and for Tokyo it was 250. Embarcadero intended good things to happen using the community toolbar but once again the QA department has failed to capture a bad bug. Something of this nature should never happen during the testing phase when the product is about to be released but lately it has happened alot. To rid the problem all you have to do is…
Read More