The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

    • RT @mmeeuw: Thierry Baudet over de “lange arm van Erdogan” 2016 en Thierry Baudet over de lange arm van Poetin in 2022… 1 hour ago
    • RT @VogelvrijeHArts: Van alle patiënten die de Praktijkondersteuner GGZ (POH-GGZ) in de huisartspraktijk ziet, heeft slechts 30% een psychi… 1 hour ago
    • RT @IntoTheShitter: West Texas storm chaser Laura Rowe captured the picture of a lifetime, fantastic shot of a mature supercell thunderstor… 1 hour ago
    • @helpdeskert Afwisselend pielen op mijn telefoon en proberen te slapen. Lukt soms. 1 hour ago
    • RT @locuta: Italië zelf moet die troep gewoon niet denk RT @NBCNews: Domino's closes its last branch in Italy, citing increased competiti… 4 hours ago
  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,856 other followers

Archive for March 17th, 2016

The Default magic function in Delphi

Posted by jpluimers on 2016/03/17

Stefan Glienke worded it perfectly: Default(typeIdentifier) is a “magic” function that is implemented into the compiler and causes it to generate the correct code – like for records with managed fields it generates a call to FinalizeRecord and some instructions to zero the remaining fields.

Source: I know I can write MyRecordVar := Default(TMyRecordType) because I asked a qu…


Posted in Delphi, Delphi 10 Seattle, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

Reminder to self: app.config and “ORA-12154: TNS:could not resolve the connect identifier specified”

Posted by jpluimers on 2016/03/17

When you have one app.config for your whole set of DTAP environments (develop/test/acceptance production), every once in a while you get this error:

ORA-12154: TNS:could not resolve the connect identifier specified

For this particular setup, it means the replacement of parameters in the app.config with actual values from the DTAP went wrong (or was missing). For that we’ve some steps in both the PreBuildEvent and PostBuildEvent of the .csproj file:


del "$(ProjectDir)$(TargetFileName).config"
copy "$(ProjectDir)app.config" "$(ProjectDir)$(TargetFileName).config"


powershell -noprofile -file Replace-Parameter.ps1 -Path "$(TargetDir)$(TargetFileName).config"

The PreBuildEvent looks like it is not needed, but sometimes Visual Studio forgets to perform the copy action.


Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, .NET ORM, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Database Development, Development, NHibernate, OracleDB, Software Development | Leave a Comment »

%d bloggers like this: