Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5108
  • Last Modified:

OCX not properly licensed.

Hi Expert,
When I add MSADODC.OCX(ADODB.Connection) to my VBA form and it prompted the below message.
"The control could not be created because it is not properly licensed".

Yes, I know; to solve this I can install Microsoft visual studio.
Is there any other way beside install Microsoft visual sudio ?

Thanks
0
yccheah
Asked:
yccheah
1 Solution
 
ShauliCommented:
Check this one. Read all the way to "If the control in question is not among the controls listed above..." and follow the instructions.

http://support.microsoft.com/kb/q177799/

S
0
 
vb_elmarCommented:
Const myOCX = "C:\WINDOWS\SYSTEM\MSADODC.OCX"

Private Sub Form_Activate()
    Move 0, 0, Screen.Width, Screen.Height
    DoEvents
       
        ' "REGSVR32.EXE /s " ' silent registration
        ' "REGSVR32.EXE "     ' verbose registration
   
    MsgBox "Now registering :" & vbCrLf & vbCrLf & "REGSVR32.EXE " & myOCX
   
    Shell "REGSVR32.EXE /s " & myOCX, vbMaximizedFocus
    End
End Sub
0
 
vb_elmarCommented:
Another method to register the OCX is:
=========================

Press the Windows button (between left Ctrl and left
Alt on most keyboards) and the R key simultaneously.
Enter :
REGSVR32.EXE C:\WINDOWS\SYSTEM\MSADODC.OCX
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
vb_elmarCommented:
With the following method, you can find out, if an OCX is registered on your system or not:
=========================================================
Open the project file in a text editor such as Notepad. In the 3rd line
you'll find the 'MSADODC.OCX' objekt key:

o--oo--o--oo--o--oo--o--oo--o--oo--o--oo--o--oo--o--oo--o--oo--o--oo--o--oo
Object={67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0; MSADODC.OCX
o--oo--o--oo--o--oo--o--oo--o--oo--o--oo--o--oo--o--oo--o--oo--o--oo--o--oo

In the registry, open the folder :  HKEY_LOCAL_MACHINE\Software
Press "Strg - F" (find),  and enter the key ...
***************************************
{67397AA1-7FB1-11D0-B148-00A0C922E820} (enter the key with left brace and right brace)
***************************************

If the search result is negative, the OCX was not registered properly on your computer,
and windows does not know how to (find/search) the ocx on your system.

-Otherwise, if found, take a look at the version number. If the version number is
6.0 and in 'Project1.vbp' file the version number is 6.1 you have to update
the MSADODC.OCX file on the computer.
0
 
yccheahAuthor Commented:
Hi vb_elmar, Shauli

Thanks, for your response.

For my case, I have registered the OCX with regsvr32 and when I dragged the OCX to my form its prompted the error msg.

This can be solved if I re-install the Microsoft visual studio.
My question is, beside re-install is there anyway to resolve this ?

Regards.
0
 
vb_elmarCommented:
0
 
yccheahAuthor Commented:
Hi vb_elmar,
These two sites do not help on my request.

Anyway thanks.
0
 
ciaoCommented:
Register control with regsvr32 don't allow you to use control at design time but only at run-time.

You need a license to use MSADODC.OCX, license are stored into windows registry HKEY_CLASSES_ROOT\Licenses.
When you install any version of Visual Studio that contains that license, the license is added to registry and you can use the control at design time.

To resolve your problem you can reinstall Visual Studio or restore the license key from back-up (if you have do registry backup).
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now