Category: Development

ADO in Navision


With ADO you can execute SQL Scripts and Stored Procedures from Navision.

To use ADO in Navision, you have to use the automation “Microsoft ActiveX Data Objects 2.8 Library”

Lets take a closer on how to make a SQL connection and perform a SQL Query in Navision.

Read more »


For test purpose I did a little test in C#, where I did use ADO.NET to make a connection to my SQL Server.

The common way to access a database is to do the following:

  1. Open a connection to the Database
  2. Perform the Query using a recordset for the returned data
  3. Extract Data needed and close the recordset
  4. Close the connection

Lets take a close look on how to do it in C# ADO.NET

Read more »

Problems when loading XML

A load will not work if the document contains a DTD / Schema definition where the validation file cannot be found!

Ex. a XML containing the following will not be able to be loaded because the DTD does not use a URI path.
Read more »

XML in Navision

In Navision there are 2 ways to handle XMLs. In all versions it is possible to use the automation Microsoft XML and from Navision 4 it is possible to use XML ports.

XML ports are thought not my preferred object, because they are limited. They work in the same way as a dataport. Therefore in the following we will concentrate us on the use of the automation Microsoft XML.

Before we are able to load/read an XML document, we must define a variable, which will provide us with a container for the document.
Read more »

XML Schemas & DTDs

XML are validated with a DTD or with an XML Schema.

Document Type Definition (DTD) defines the legal elements of an XML Document.

<!DOCTYPE note SYSTEM “external.dtd”>

XML Schema is an XML-based alternativ to DTD.
Read more »

XML Rules

Following rules must be applied when working with XML:

  • Single, unique root element
  • Matching open/close tags
  • Consistent capitalisation
  • Correctly nested elements (no overlapping elements)
  • Attribute values enclosed in quotes
  • No repeating attributes in an element

Read more »