Microsoft Common Dialog Control 6.0 (SP3)

DraqosDraqos Posts: 36Member
edited 2012-08-22 in Navision Attain
I imported some tables (from text format) and when i complile I receive 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"

The control is registered, i have no ideea about what I should do to obtain a design-time license...
I have read another post on this forum regarding the same problem, but i did not understand exactly what the sollution is.
"Simplicity is the ultimate sophistication."
Leonardo DaVinci

Comments

  • kinekine Posts: 12,553Member
    To add new variables for some OCX you must have design licence for this OCX. Common dialog library is OCX with licence. This licence is installed for example with Visual studio etc... it is some key in registry HKEY_CLASSES_ROOT\Licenses\...

    Install visual studio and it is ok (or import apropriate reg file from installaction cd for visual studio... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • pavopavo Posts: 3Member
    You can also use codeunit 412 "Common Dialog Management".
  • EugeneEugene Posts: 309Member
    that is exactly the problem - codeunit 412 does not compile
    could this problem be caused by having Visual Studio Beta2 installed on the same computer (probably due to update of CommonDialogs library - new service pack with more restrictive licence) ?
  • kinekine Posts: 12,553Member
    if it does not compile, take the comdlg32.ocx and register it...

    there is no problem for example with VS2005...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • EugeneEugene Posts: 309Member
    the problem is comdlg32.ocx requires design-time licence.
    to install the licence use the VB6Controls.reg file that can be found for example on Visual Studio CDs in Extras/VBControls directory
    merge the reg file into windows registry and problem is solved
  • kinekine Posts: 12,553Member
    But you need this license only if you want to add new variable into Navision. Not for compiling the codeunit 412...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ara3nara3n Posts: 9,147Member
    The way navision check for the license for the OCX is based on Control ID.
    If it's in 1 through 1000, it doesn't give you the error.

    Maually recreate codeunit 412, without copying and pasting, and you'll get the license error.

    But if you copy and paste the function into a new codeunit, it will compile.

    Navision errors if your variable are in one million range. If you export the object to text, you'll see that every variable e.g. text@10000000023 .

    if you change it text@001, and they all have to be unique, you'll be able to use the ocx.
  • Djou2424Djou2424 Posts: 65Member
    Codeunit 412 doesn't compile for me even if I didn't modify it. It's still the same object that came with Navision 4.0 SP1.
    And yes, the OCX is registered.

    I looked at the Control ID of the OCX variable and it is set at 1005.
    I tried to change it to 400 by changing the properties of the variable and by exporting the object in text, changing the value and importing the text file in Navision and I got the following error both times:
    "The variable ID 400 for variable CommonDialogControl is reserved for C/SIDE-defined variables only. The minimum ID number allowed is 1000."

    Anything I'm missing?
  • BeliasBelias Posts: 2,969Member
    yes, is Djou missing something?
    I got the same issue!
    someone can help plz?
    OK, solved by copying 'n' pasting the variable...thanks BTW
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • BeliasBelias Posts: 2,969Member
    I've had this problem another time, and i didn't remember how to solve it...it's strange to find the same post to solve the same problem...i should have remembered this, i'm a donkey

    0 0
    /\
    :shock:
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • mximxi Posts: 9Member
    Hello,

    I've a similar Problem. On my System I can compile the Codeunit where I use the comdlg32.ocx. But on the Server (Windows 7 64 bit), where the ocx is also registered the Codeunit doesn't compile. It only compiles if I import as a FOB. As txt it doesn't compile. I have to import as a txt.

    Is there maybe another ocx for the 64 bit System? Or have somebody another idea?
  • lvanvugtlvanvugt Posts: 735Member
    kine wrote:
    Install visual studio and it is ok
    Strange: we have VS 2010 installed but are getting the error anyway. Did i maiss something?
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • jhoekjhoek Posts: 218Member
    lvanvugt wrote:
    kine wrote:
    Install visual studio and it is ok
    Strange: we have VS 2010 installed but are getting the error anyway. Did i maiss something?

    Judging from http://support.microsoft.com/default.as ... -us;318597, it needs to be Visual Studio 2005 or before.
    Kind regards,

    Jan Hoek
    Sr. Software Engineer
    www.idyn.nl
Sign In or Register to comment.