Microsoft Common Dialog Control 6.0 (SP3)

DraqosDraqos Member Posts: 36
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 Member Posts: 12,562
    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 Member Posts: 3
    You can also use codeunit 412 "Common Dialog Management".
  • EugeneEugene Member Posts: 309
    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 Member Posts: 12,562
    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 Member Posts: 309
    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 Member Posts: 12,562
    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 Member Posts: 9,256
    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.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Djou2424Djou2424 Member Posts: 76
    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 Member Posts: 2,998
    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 Member Posts: 2,998
    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 Member Posts: 9
    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 Member Posts: 774
    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 Member Posts: 216
    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
    Product Developer
    Mprise Products B.V.
Sign In or Register to comment.