Transferring small amount of data between databases

Most of us have needed to copy data from one Dynamics NAV database to another.  For example the posting setup tables, payment terms, currency, etc.

If the databases are not identical you will not be able to copy and paste the data and you have to solve this problem with dataports or XMLPorts.

I offer a solution to this problem.  I have created a form that is able to export and import data based on table and field numbers.  It will import data to a table even if some fields are missing in the destination database.

Here is the source code

5 Replies to “Transferring small amount of data between databases”

  1. Hi ,
    This is a very nice idea but I got some issues first it cannot be opened because of the Id it has been set.
    So I changed the Id to a customer Id .It was successful but here also I get this problem when I compile it .It gives me this error message :
    Microsoft Dynamics NAV Classic
    This message is for C/AL programmers:

    The OLE control or Automation server identified by
    ‘Microsoft Common Dialog Control 6.0 (SP3)’.CommonDialog
    requires a design time license. This license cannot be obtained.
    Make sure that the OLE control or Automation server is installed correctly with the appropriate license.


    1. Hi Tavish

      You will need to compile on a machine with Visual Studio installed if the object includes the Microsoft Common Dialog Control 6.0 (SP3)’.CommonDialog.
      Not sure what version/specific version of Visual Studio is required.

      1. Thank you, Gunnar! I have VS2012 and that part of the compliation worked. All the XML stuff could not be compiled, I needed to choose the variables. If anyone has the same issue: it is called Microsoft XML, and generally for every compilation error, choose either the DomDocument, or under the IXML* part the stuff that sounds closest to the variable name i.e. the XMLProsInst is the IXMLProcessingInstruction.

        This looks very useful because we will not use the upgrade toolkit, just export items, customers etc. and thus do a partial upgrade, without the history. I think that way the upgrade will be easier. We will keep an old Classic Client around for looking up stuff in the old database.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.