1

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?

Pascal
  • 125
  • 1
  • 15

3 Answers3

1

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.

Jan Hoek
  • 702
  • 5
  • 13
  • So installing Visual Studio 2010 will not install the needed licenses/license keys in the registry? Just the older versions? – Pascal Aug 22 '12 at 08:40
  • In the meantime I was able to test if installing Visual Studio 2010 Professional really does not help. But it does! – Pascal Aug 30 '12 at 08:01
  • I'm happy to hear your managed to solve your problem. Sorry for (unintentionally) misinforming you - I thought I had read on mibuso.com that only older editions of VS would work... – Jan Hoek Aug 31 '12 at 08:28
0

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.

YvesR
  • 5,922
  • 6
  • 43
  • 70
  • What license are we talking about? As I said, I have a NAV developer license active and I can CRUD and compile every other object I'm interested in. I think I'm missing some other kind of license for interacting with the OLE component, am I? – Pascal Aug 21 '12 at 14:02
  • 'CommonDialog requires a design time license' <- There it seems it can't find the proper license, at least this method checks for a linense and can't find it. Check this, maybe it helps: http://www.mibuso.com/forum/viewtopic.php?f=14&t=49743&view=previous – YvesR Aug 21 '12 at 14:04
  • There seems to be a different kind of license involved than the NAV developer license. I found this [documentation](http://msdn.microsoft.com/en-us/library/aa751973%28v=vs.85%29.aspx). A .lic license file is expected; but the NAV license file extension is .flf. So I really do need a different kind of license. – Pascal Aug 21 '12 at 14:13
0

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.

Mak Sim
  • 2,148
  • 19
  • 30
  • Yes, I knew that trick and asked a question about that type of "magic", but nobody could or would answer [that](http://stackoverflow.com/questions/12071257/why-does-dynamics-nav-except-to-copy-an-ocx-variable-to-another-object-and-using). – Pascal Oct 15 '13 at 10:16