Question

I imported a Form object from a text file. When I try to compile it I get the following error message:

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 an appropriate license"

I am developing in Dynamics NAV using a developer license. The OCX is registered correctly, gets listed in NAV's "Custom Controls" as pointing to "C:\Windows\SysWOW64\comdlg32.ocx".
Why am I not allowed to compile the object?

Was it helpful?

Solution

The license in question is, as you said, purely for using the CommonDialog component in design-time environments. This has nothing to do with your NAV license or your customers being able to run code that uses the component. The design-time license (which is nothing more than a key in your system registry; not an actual license file) used to get installed with e.g. Microsoft Visual Basic 6.0 or older versions of Microsoft Visual Studio.

If you have access to VB6.0 or VS2005, you can use VB6Controls.reg on the installation disk as described here: http://support.microsoft.com/default.aspx?scid=kb;en-us;318597.

OTHER TIPS

As the message said, the components loads, try to get a license and don't get one. So you don't have one as it says or you don't have it in the path lookup the components looks at it.

There is one more trick you can do to fix this problem and avoid installing a lot of crap like VB6.0.

This message is related to certain automation type variable in the object you trying to compile.

You can copy this variable from any other compiled object in other database or any other compiled object in the same database. And then your imported object will magically compile. Just delete the variable from your imported object's variable list and copy it from compiled object with copy-paste.

I don't know what magic is that but it worked for me many times. I copied variable from the same object in restored backup of the database.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top