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 ‘Objects’

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: 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.

INFO: Programmer’s Guide to Using ADO in Visual Basic

Symptoms
This article presents useful information for anyone wanting to takeadvantage of the ActiveX Data Objects (ADO) within Visual Basic versions5.0 and 6.0. Topics covered are:
How to find ADO Knowledge Base ArticlesADO Resources/Points of Information

Resolution
How to Find ADO Knowledge Base ArticlesADO is not a technology that ships with one particular product, and has been treated as a product in its own right.
For more information about this issue, please see the following article in the Microsoft Knowledge Base:
183606?(http://support.microsoft.com/kb/183606/EN-US/)ActiveX Data Objects (ADO) Frequently Asked Questionsand choose “ActiveX Data Objects” as the product and enter your specific search topic.
You can also pick “All Microsoft Products” or use the MSDN or other non-Web-based Knowledge Base search mechanisms, and search for the keyword “kbado,” which all ADO articles contain.
ADO Resources/Points of InformationADO originally shipped with the OLE-DB Software Development Kit (SDK), but now is part of Microsoft Data Access Components or MDAC. To learn more about it, please visit the Microsoft Universal Data Access Web site:
http://msdn.microsoft.com/en-us/data/aa937729.aspx(http://msdn.microsoft.com/en-us/data/aa937729.aspx)or the ADO-specific Web page at:
http://msdn.microsoft.com/en-us/library/ms811450.aspx(http://msdn.microsoft.com/en-us/library/ms811450.aspx)