I forgot to schedule the post below. It is still relevant if you create a machine with lots of Delphi versions on it.
VM disk sizes
Posted by jpluimers on 2018/06/29
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, Database Development, Delphi, Delphi 2007, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Firebird, InterBase, Power User, Software Development, Windows, Windows 8 | 2 Comments »
When you cannot RDP to a target because of “CredSSP-encryption Oracle remediation”: apply your target security patches.
Posted by jpluimers on 2018/06/29
If you get the below error, then your RDP target server needs to be patched.
You can choose to stay vulnerable and modify your policy or registry settings as explained in the first linked article below: that is a temporary “workaround” which I do not recommend. Please update your RDP target servers in stead.
English:
[Window Title] Remote Desktop Connection [Content] An authentication error has occurred. The function requested is not supported Remote computer: rdp.example.org This could be due to CredSSP-encryption Oracle remediation. For more information, see https://go.microsoft.com/fwlink/?linkid=866660 [OK]
Posted in Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016 | Leave a Comment »
Wer kann mir erklären: Warum braucht ein Windows10-Update heute immer noch me…
Posted by jpluimers on 2018/06/29
Some historic perspective (although on Windows since quite a long time, you can rename files before replacing them: that works very well):
[WayBack] Wer kann mir erklären: Warum braucht ein Windows10-Update heute immer noch mehrere Reboots? – Kristian Köhntopp – Google+
Zu MS-DOS Zeiten gab es kein Netz und kein Multiprocessing. Als Netz und Fileshares dann dazu kamen, funktionierten viele Anwendungen nicht korrekt.
Zu dieser Zeit hat Microsoft die Entscheidung getroffen, vom Betriebssystem aus Mandatory File Locking für geöffnete Dateien zu implementieren, es sei denn, ein Prozeß stellt das von sich aus anders ein.
Mandatory File Locking heißt in diesem Fall, daß nix und niemand eine Datei anfassen kann, die offen ist, Ein laufendes Executeable, eine DLL oder ein Logfile sind aber immer offen.
Daher gibt es einen Reboot Hook, mit dem ein Updater Dateiersetzungen für einen System Neustart hinterlegen kann. Beim Reboot werden die Dateien dann schnell ausgetauscht bevor sie geöffnet werden.
–jeroen
Posted in History, Power User, Windows | Leave a Comment »
Solving “HHC6003: Error: The file Itircl.dll has not been registered correctly” – “Microsoft HTML Help Compiler 4.74.8702”
Posted by jpluimers on 2018/06/29
When generating the Spring4D documentation at https://spring4d.4delphi.com/ using Documentation Insight by DevJet, I got this error:
HHC6003: Error: The file Itircl.dll has not been registered correctly.
Microsoft HTML Help Compiler 4.74.8702
Solving it turned out easy:
regsvr32 "%ProgramFiles(x86)%\Documentation Insight 3\Compilers\CHM\itcc.dll"
I got there via [WayBack] HTML Help FAQ – Wiki.HelpMVP.com:
“HHC6003: The file itircl.dll has not been registered correctly”
This error effects only a small number of users. A HH component (c:\windows\system\itcc.dll) did not get installed or registered correctly. If not installed get the DLL from another PC containing Workshop. To register the DLL run
regsvr32 c:\windows\system\itcc.dll (this path may be different for your PC – eg. c:\winnnt\system32).This fix was originally reported by MVP David Liske: [WayBack] http://www.mvps.org/htmlhelpcenter/itircl.htm
–jeroen
Posted in Power User, Windows | Leave a Comment »
Delphi still doesn’t raise overflow exception on Int64 multiplication…
Posted by jpluimers on 2018/06/28
Thanks to Stefan Glienke for pointing me at the below patch for [WayBack] Why doesn’t raise overflow exception on multiplication example or how to detect in this case?{$RANGECHECKS ON} {$OVERFLOWCHECKS ON}varvalue: Int64;… – Rafael Dipold – Google+.
It’s basically an issue in __llmulo that has been documented but not solved since “forever”:
some people “some while ago” reported this and even posted a solution: [WayBack] http://qc.embarcadero.com/wc/qcmain.aspx?d=34049
And there it is again: [WayBack] http://qc.embarcadero.com/wc/qcmain.aspx?d=119146
And most recently: https://quality.embarcadero.com/browse/RSP-16617
FWIW here is a runtime patch that corrects this (using the version posted in QC#119146): https://pastebin.com/jzLgYeqm
The bug tracking of the Delphi team is so bad, that some of the reports actually mark this issue “As Designed” like in [WayBack] http://qc.embarcadero.com/wc/qcmain.aspx?d=118287
The below patch requires rights to call [WayBack] WriteProcessMemory as documented in [WayBack] How to Read and Write Other Process Memory.
–jeroen
Patch at [WayBack] https://pastebin.com/jzLgYeqm
Posted in Delphi, Development, QC, Software Development | 3 Comments »
Some notes on what errors you get when using a gds32.dll not matching your Firebird or InterBase
Posted by jpluimers on 2018/06/28
These were some of the errors and error fragments I got when I had the wrong gds32.dll or wrong Database engine:
file C:\PROGRAMDATA\EMBARCADERO\INTERBASE\GDS_DB\EXAMPLES\DATABASE\EMPLOYEE.GDB is not a valid databaseI/O error during "CreateFile (open)" operation for file "C:\PROGRAMDATA\EMBARCADERO\INTERBASE\GDS_DB\EXAMPLES\DATABASE\EMPLOYEE.GDB"connection rejected by remote interface
Since I used IBX, they were all inside EInterbaseError exception instances.
The bad thing: with IBX you cannot specify your gds32.dll: you have to ensure the right version/architecture is loaded by your executable.
–jeroen
via: Source: Delphi, IBX and the Turkish I problem
Posted in Database Development, Development, Firebird, InterBase | Leave a Comment »
Database Identifiers | Microsoft Docs
Posted by jpluimers on 2018/06/27
As I needed to know which other characters besides $ are allowed in MSSQL identifiers: [WayBack] Database Identifiers | Microsoft Docs
The 2017 specs:
There are two classes of identifiers:
Regular identifiers
Comply with the rules for the format of identifiers. Regular identifiers are not delimited when they are used in Transact-SQL statements.SELECT * FROM TableX WHERE KeyCol = 124Delimited identifiers
Are enclosed in double quotation marks (“) or brackets ([ ]). Identifiers that comply with the rules for the format of identifiers might not be delimited. For example:SELECT * FROM [TableX] --Delimiter is optional. WHERE [KeyCol] = 124 --Delimiter is optional.Identifiers that do not comply with all the rules for identifiers must be delimited in a Transact-SQL statement. For example:
SELECT * FROM [My Table] --Identifier contains a space and uses a reserved keyword. WHERE [order] = 10 --Identifier is a reserved keyword.Both regular and delimited identifiers must contain from 1 through 128 characters. For local temporary tables, the identifier can have a maximum of 116 characters.
Rules for Regular Identifiers
The names of variables, functions, and stored procedures must comply with the following rules for Transact-SQL identifiers.
- The first character must be one of the following:
- A letter as defined by the Unicode Standard 3.2. The Unicode definition of letters includes Latin characters from a through z, from A through Z, and also letter characters from other languages.
- The underscore (_), at sign (@), or number sign (#).Certain symbols at the beginning of an identifier have special meaning in SQL Server. A regular identifier that starts with the at sign always denotes a local variable or parameter and cannot be used as the name of any other type of object. An identifier that starts with a number sign denotes a temporary table or procedure. An identifier that starts with double number signs (##) denotes a global temporary object. Although the number sign or double number sign characters can be used to begin the names of other types of objects, we do not recommend this practice.
Some Transact-SQL functions have names that start with double at signs (@@). To avoid confusion with these functions, you should not use names that start with @@.
- Subsequent characters can include the following:
- Letters as defined in the Unicode Standard 3.2.
- Decimal numbers from either Basic Latin or other national scripts.
- The at sign, dollar sign ($), number sign, or underscore.
- The identifier must not be a Transact-SQL reserved word. SQL Server reserves both the uppercase and lowercase versions of reserved words. When identifiers are used in Transact-SQL statements, the identifiers that do not comply with these rules must be delimited by double quotation marks or brackets. The words that are reserved depend on the database compatibility level. This level can be set by using the ALTER DATABASE statement.
- Embedded spaces or special characters are not allowed.
- Supplementary characters are not allowed.When identifiers are used in Transact-SQL statements, the identifiers that do not comply with these rules must be delimited by double quotation marks or brackets.
Note
Some rules for the format of regular identifiers depend on the database compatibility level. This level can be set by using ALTER DATABASE.
Related: [WayBack] ALTER DATABASE Compatibility Level (Transact-SQL) | Microsoft Docs
–jeroen
Posted in Database Development, Development, SQL Server | Leave a Comment »
MySQL – there now seem to be replication mechanisms that work
Posted by jpluimers on 2018/06/27
Reminder to self, as yet another client insisted this was possible, but in the past it wasn’t reliably possible, some links from Kristian Köhntopp:
- 2012 state – [WayBack] Some basics about distributed databases – The Isoblog.
- 2017 state – [WayBack] Galera vs. Group Replication – The Isoblog.
–jeroen
Posted in Database Development, Development, MySQL | 2 Comments »
Stop Delphi generating .res files for unit test applications
Posted by jpluimers on 2018/06/27
By default, Delphi always generates .res resource files when compiling a project.
There are two things you need to change to turn this off; the first is on by default, the second could be your own change:
- Remove the
{$R *.res}from your .dpr file and turn “Runtime Themes” to “None” from the default “Enable runtime themes” under “Target” settings “All configurations – 32-bit Windows platform” and “All configurations – 64-bit Windows platform”
- Disable “Include version information in project” under “Target” settings “All configurations – 32-bit Windows platform” and “All configurations – 64-bit Windows platform”

Posted in Delphi, Development, Software Development | 1 Comment »
SQL: “where not exists … having” formulation; anti-join alternative
Posted by jpluimers on 2018/06/26
I need to write up some notes, but there are some links that will help me:
- [WayBack] progress db – Exclude rows based on other rows (SQL) – Stack Overflow
- [WayBack] sql – EXISTS vs JOIN and use of EXISTS clause – Stack Overflow
- [WayBack] sql – is there something faster than “having count” for large tables? – Stack Overflow
- [WayBack] sql server – EXISTS (SELECT 1 …) vs EXISTS (SELECT * …) One or the other? – Database Administrators Stack Exchange has even more elaborate answers than [WayBack] sql – What is easier to read in EXISTS subqueries? – Stack Overflow
It’s a question of readability. There is no difference in performance.
Old versions of SQL Server were silly enough to look up meta data, but not any more.SELECT foo FROM bar WHERE EXISTS (SELECT * FROM baz WHERE baz.id = bar.id); SELECT foo FROM bar WHERE EXISTS (SELECT 1 FROM baz WHERE baz.id = bar.id);I am not considering NULL or “fun variants” which don’t seem intuitive to me.
SELECT foo FROM bar WHERE EXISTS (SELECT NULL FROM baz WHERE baz.id = bar.id);SELECT foo FROM bar WHERE EXISTS (SELECT 1/0 FROM baz WHERE baz.id = bar.id);
The question popped up in comments just now. I researched the manuals of the most popular RDBMS:
- MS SQL seems to favor
SELECT *in the manual.- The example in the PostgreSQL 9.4 manual uses
SELECT 1.- Oracle 11g has
SELECT *in the language reference.- MySQL 5.7 has
SELECT *in the reference manual but alsoSELECT 1in the comments.- SQLite has no example in the language reference.
A search on SO for
code:"EXISTS (SELECT 1"yields 5,048 results.
A search on SO forcode:"EXISTS (SELECT *"yields 5,154 results.
Updated links and counts 07.2015.So
SELECT *has the popular vote and the big commercial RDBMS on its side.
I findSELECT 1more intuitive. It’s like saying “if at least one exists”.
IsSELECT *more intuitive?
–jeroen
Posted in Database Development, Development, Firebird, InterBase, MySQL, PostgreSQL, SQL, SQL Server | Leave a Comment »


