O'Reilly logo

Extending Microsoft Dynamics NAV 2016 Cookbook by Alexander Drogin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with the Variant datatype

The Variant datatype is widely used in the Component Object Model to represent variables with no explicitly defined type. The datatype of the value stored in a Variant variable can be defined at runtime, when the value is assigned.

C/AL supports Variant variables and a variety of functions that help to identify the type of a variable content.

The following example runs a database query through the ActiveX Data Objects (ADO) library. Field values in the resulting recordset are returned as Variant data that can be interpreted by the client C/AL code.

How to do it...

  1. The code for this example will be implemented in a Page object. Run the NAV object designer and create a page. Select the Customer table as a data source ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required