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 ‘microsoft data access’

FIX: ADO DataControl and DataEnvironment Events Only Work with ADO 2.0

Symptoms
When you attempt to use the events of an ADO Data Control or the DataEnvironment with a reference to a version of the Microsoft ActiveX Data Objects (ADO) later than version 2.0, you receive the following error message:

Compile error:
Procedure declaration does not match description of event or procedure having the same name.
Resolution
The ADO Data Control and the Data Environment were compiled using Microsoft Data Access Components version 2.0.

PRB: Setting ADO Recordset Cachesize with JET OLEDB Provider Returns Error with MDAC 2.1 SP2

Symptoms
Attempting to set the ActiveX Data Objects (ADO) recordset’s Cachesize property returns the following error message:

Run-time error ‘3001′:
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.This error occurs when Microsoft Data Access Component (MDAC) version 2.1 SP2 is installed on the computer and a JET OLEDB provider has been used to create the ADO connection.
Resolution
The current workaround is to use the Microsoft Access ODBC driver when creating the ADO connection.

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: CLSID {00000010-0000-0010-8000-00AA006D2EA4} Not Found When You Run an Application

Symptoms
When you first try to run an application that a Visual Basic 6.0 Setup package installed and that the Packaging and Deployment Wizard (PDW) created, you may receive the following error message:

Class not registered.
Looking for object with CLSID {00000010-0000-0010-8000-00AA006D2EA4}.
Resolution
This error occurs when the Visual Basic 6.0 project references the Microsoft Data Access Objects (DAO) 3.6 Object Library (DAO360.dll) and not DAO350.dll. The {00000010-0000-0010-8000-00AA006D2EA4} CLSID is associated with DAO350.dll.
When the intrinsic Data control’s Connect property is set to Access, and the application uses this Data control, the application requires that DAO350.dll is registered on the system. However, DAO350.dll is not included in the distribution package that the PDW creates because it is not referenced in the project.

PRB: “Too Many Columns Defined in the Rowset” Error Message

Symptoms
Running under versions of Microsoft Data Access Components (MDAC) prior to 2.5, you get the following error when choosing a Recordset object:

Run-time error ‘-2147024882 (8007000e)’Too many columns defined in the rowset.Running under MDAC 2.5 and later, you get the following error:

Run-time error ‘-2147024882 (8007000e)’:Rowsets cannot contain more than 2048 columns.
Resolution
Prior to MDAC 2.5, the client-cursor engine supported a maximum of 255 fields.
Under MDAC versions 2.5 and later, the client-cursor engine supports a maximum of 2048 fields.

Internet Explorer reports unknown type .VBD for Active Document

Symptoms
You may experience problems with Active Documents that will be used on a Web server. The Active Document works on the development computer but fails on computers that try to access it over the Internet. You may receive the following error message:

Internet Explorer is opening file of unknown type:
<Name of Document>.VBD from Internet Explorer reports this generic message whenever it encounters problems while processing a .vbd file.
Resolution
This problem can be caused by one of the following scenarios:The registry contains a .vbd extension entry.You are trying to download a Microsoft Data Access Components (MDAC) component with your .vbd file.The wrong version of Visual Basic run-time or OLE files are referenced.You are using the wrong .vbd file.You are using an out-dated .vbd file.The Actxprxy.dll file is missing or is not registered properly.The Active Document .exe or .dll file is not registered properly.The Active Document is not signed or safe for scripting.There is a run-time error in the initialization code of the Active Document.Dependent files are not being downloaded.Other problems that can occur.