Code Example Center

Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.

Tuesday, December 2, 2025

c++ - How to swap variables without another variable, XOR usage

›
int a = 5; int b = 10; std::cout Output: A = 5 B = 10 A = 10 B = 5
Tuesday, November 25, 2025

c++ - How to make .dll and call it from c#

›
c++ DLL cpp: extern "C" __declspec( dllexport ) int math_add( int const d1, int const d2 ) { return d1 + d2; } Test c++ con...
Tuesday, November 4, 2025

c# - How to call Min(), Max() on generic List

›
DateTime minStartTime = ListOfProcesesForKilling.Min( p => { return p.StartTime; } ); value += $"Min starttime: {minStar...

c# - How to force JSON enum to save as TEXT instead of a NUMBER

›
This enum property: public enum MinimizeActionEnum { NONE = 0, CLEAR = 1 } public MinimizeActionEnum MinimizeAction { get; set; } =...
Friday, October 31, 2025

ssrs - How to make expression to get yesterday date

›
=DateAdd("d", -1, Today())
Wednesday, October 15, 2025

sql server - How to get detailed info about localdb

›
List of installed local DBs: sqllocaldb i Output: MSSQLLocalDB More details about selected: sqllocaldb info MSSQLLocalDB Output: Na...
Monday, October 13, 2025

c# - How to solve JSON deserialization problem

›
JSON deserialization returns this error: Each parameter in the deserialization constructor on type 'cieb_AXReportPrintDLG.ReportParamC...
Monday, September 29, 2025

c# - How to solve problem with convension date into string with char "/" in format mask

›
This result can be obtained when trying to convert a date to a string using a format mask containing the character '/'. DateTime d...
Wednesday, September 17, 2025

sql server - How to solve problem with CHARINDEX() - value subtraction

›
If you use this SQL code: SUBSTRING( a.PackingSlipId, 1, CHARINDEX('-', a.PackingSlipId ) - 1 ) as document, ..you can get this e...
Friday, September 5, 2025

ssrs - How to replace char with new row char

›
=Replace( Fields!Field.Value, ",", vbCrLf )
Tuesday, September 2, 2025

c# - How to add items to combobox with text description from attribute

›
Define new enum with attributes: /* types for printing type combobox */ public enum PrintingTypeEnum { [Description( "On screen...
Tuesday, May 13, 2025

c# - EF - How to call storedproc with OUTPUT param

›
You have this stored proc: ALTER PROCEDURE [dbo].[TEST] -- Add the parameters for the stored procedure here ( @Param1 int, @Message varch...

c# - EF - How to refresh existing DB into EF model

›
If you have DB and if you want to refresh it`s model into MODEL directory, call this: dotnet ef dbcontext scaffold "Server=(LocalDB)\...
Tuesday, February 11, 2025

sql server - How to run export script by sqlcmd

›
In command.sql is stored SQL select script, this calling performs it and save output to output.txt. The param "-h -1" removes ti...
Monday, January 13, 2025

ax - How to check if the class is running in the batch mode ?

›
boolean bManualRunning = (BatchHeader::isExecutingInBatch() == false );
Wednesday, December 18, 2024

ax - How to find type used for specified Number Sequence ?

›
Searching for the data type for the sequence Time_6: select datatypeid from NUMBERSEQUENCEDATATYPE where recid = ( select NUMBERSEQUE...
Thursday, August 8, 2024

SSRS - How to add stripline to chart

›
The stripline is in this example defined on X axis.   Remember: the value for StartWith is order of the axis value, not exact value ( Start...
Thursday, July 18, 2024

ax - How to get ItemId by ExternalItemId for specified customer

›
CustVendExternalItem custVendExternalItem; ItemId itemId; ... itemId = ""; custVendExternalItem = CustVendExternalItem::findExter...
Friday, June 21, 2024

SSRS - How to get first and last day in month

›
These are useful functions, for example for parameter filling: First and last day of this month: =dateadd("m",0,dateserial(year(...
Monday, June 17, 2024

c - How to solve error UNRESOLVED EXTERNAL SYMBOL for static class field

›
.h class OverloadedOperator { public: string name; float price; static int n; }; The problem could be in missing static field in...
Thursday, May 2, 2024

sql server - How to check used count of decimal places in the field

›
select prodid, remaininventphysical, len(replace( rtrim( replace( convert( varchar, remaininventphysical), '0', ' ' ) ),...
Thursday, March 21, 2024

c_c++ - How to check DLL architecture (x86 vs x64)

›
From VS terminal run this command: dumpbin /headers clib.dll Output: Dump of file clib.dll PE signature found File Type: DLL FILE HEADE...

c_c++ - How to check entry points of the DLL

›
From VS terminal run this command: dumpbin /exports clib.dll Output, you can see two entry points: Dump of file clib.dll File Type: DLL ...
Tuesday, January 16, 2024

c# - How to use LINQ aggregate() function

›
This calling performs SUM on Population (with starting value = 0.) public List<Country> Countries = new(); ... this.Countries.Ad...
Thursday, November 30, 2023

c# - How to call custom event

›
1) Custom event without parameters: public Action OnBeforeEvaluationEvent; ... if ( OnBeforeEvaluationEvent != null ) OnBeforeEvaluationEv...
›
Home
View web version
Powered by Blogger.