Visual Basic Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘ActiveX’

BUG: User Defined Type Not Defined Using Binary Compatibility

Symptoms
When compiling an ActiveX DLL or ActiveX EXE with Binary Compatibility, thefollowing error occurs:

Compile Error : User defined type not defined
Resolution
Turn off Binary Compatibility and compile the project. Visual Basic willhighlight the line of code that contains the User Defined Type that is notdefined. After resolving the problem, Binary Compatibility can be turnedback on.

BUG: User Defined Type Not Defined Using Binary Compatibility

Symptoms
When compiling an ActiveX DLL or ActiveX EXE with Binary Compatibility, thefollowing error occurs:

Compile Error : User defined type not defined
Resolution
Turn off Binary Compatibility and compile the project. Visual Basic willhighlight the line of code that contains the User Defined Type that is notdefined. After resolving the problem, Binary Compatibility can be turnedback on.

PRB: Improper Installation of MDAC May Return Error Message “Method ‘~’ of Object ‘~’ Failed” at Run Time with ADO Application

Symptoms
When you attempt to run simple ActiveX Data Objects (ADO) code in an application, the following error can occur:

“Method ‘~’ of Object ‘~’ Failed”
Resolution
The most common cause for this error is mismatched DLL files with Microsoft Data Access Components (MDAC).

PRB: DCOMCNFG Displays One Class Name For Each ActiveX Server

Symptoms
When using the Distributed Component Object Model (DCOM) ConfigurationUtility (Dcomcnfg.exe), only one class for each ActiveX server appears inthe list of applications. This occurs even though an ActiveX server maycontain several classes, each of which is functioning correctly.
Resolution
DCOM provides server level security. All objects within a server share thesame security settings. Therefore, Dcomcnfg.exe only lists the first object(class) for each ActiveX server registered.

PRB: ADO: Compile Error: User-Defined Type Not Defined

Symptoms
When you compile your ADO project, you receive the following error:

Compile error:User-defined type not definedThis can occur on either a Connection or Command object.
Resolution
You may have referenced one of the following libraries instead of theMicrosoft ActiveX Data Objects (ADODB) type library:Microsoft ActiveX Data Objects Recordset (ADOR) type library.
-or-Microsoft ActiveX Data Objects (Multi-dimensional) (ADOMD) type library.