Symptoms
The information below includes the documentation and workarounds for VisualBasic 6.0. This information can also be found in the README.htm file thatships with Visual Basic 6.0 on the Visual Basic 6.0 CD-ROM. Please see theREFERENCES section of this article for a list of the Microsoft KnowledgeBase articles relating to the Visual Basic 6.0 readme.
Following is a list of all parts of the readme file:
Part 1.Important Issues – Please Read First!
Part 2.Data Access Issues and DataBinding Tips
Part 3.Control Issues
Part 4.Language Issues
Part 5.Samples Issues
Part 6.Wizard Issues
Part 7.Error Message Issues
Part 8.WebClass Designer Issues
Part 9.DHTML Page Designer Issues
Part 10. Extensibility issues
Part 11. Miscellaneous Issues
Part 12. Microsoft Transaction Server (MTS) Issues
Part 13. Dictionary Object
Part 14. Visual Component Manager
Part 15. Application Performance Manager
Resolution
Error in Data Environment Designer Code ExampleIn the topic, “Programmatically Accessing Objects in Your Data EnvironmentDesigner,” the example under “Executing a Command Object with MultipleParameters” erroneously uses the Open method:

MyDE.Commands(“InsertCustomer”).Parameters(“ID”).value = “34″MyDE.Commands(“InsertCustomer”).Parameters(“Name”).value = “Fred”MyDE.Commands(“InsertCustomer”).Open
There is no Open method for the Commands object. You must use the Executemethod instead.
Incompatibilities with Data-bound ControlsDue to changes in Visual Basic 6.0, not all data-bound controls arecompatible with all data sources. This incompatibility is due to adifference in the internal binding mechanisms of ADO versus DAO/RDO.Controls that were created specifically to work with DAO/RDO can’t be boundto an ADO Data control; controls created for use with ADO can’t be bound tothe standard Data control or the Remote Data Control.
This incompatibility primarily applies to complex-bound controls such asgrids or lists that bind to multiple fields in a data source; simple-boundcontrols such as text boxes or labels that bind to a single field will workwith either type of data source. Some examples are as follows:
The Microsoft Data Bound Grid control (Dbgrid32.ocx) can be bound to theDAO or RDO Data controls; it can’t be bound to the ADO Data control. The Microsoft DataGrid control (Msdatgrd.ocx) can be bound to the ADOData control; it can’t be bound to the DAO or RDO Data controls. The Microsoft Masked Edit Control (Msmask32.ocx) can be bound to any ofthe Data controls. The intrinsic controls (TextBox, PictureBox, Label, and so on) can bebound to any of the Data controls. Third-party controls and Visual Basic-authored User controls should betested on a case-by-case basis. When attempting to bind a control to a data source at design-time, you mayencounter a “No compatible data source” error message. In this case, youwill need to substitute another control that is compatible with your datasource.
Binding to Properties of Objects May Yield Unexpected ResultsWhile it is possible to bind any object to any other object, the resultsmay not always be what you expect. Some properties are read-only bindableand will not update their bound source.
For example, if you were to bind the Caption property of a Frame control toa field named Foo in an ADO Recordset object, the Caption would change toreflect the value of Foo as you scrolled through the Recordset. If,however, you changed the Caption property programmatically (Frame1.Caption= “Bar”), the value of Foo would not be updated. Because the Captionproperty of the Frame is read-only bindable, it doesn’t providenotification that its data has changed.
This isn’t a problem for Visual Basic-authored objects, since you can callthe PropertyChanged method in your object’s code. For other objects, youcan determine if a property is update bindable by checking the DataBindingscollection. If a property is enumerated in the DataBindings collection, itis update bindable and the data source will receive updates to data; if itisn’t enumerated, the property is read-only bindable.
Complex Binding to an ADO Recordset Requires CursorTypeWhen binding an ADO Recordset object to a complex-bound control (such as aGrid control), it is necessary to explicitly set the CursorType property toeither adOpenStatic or adOpenKeyset. If you don’t set this property, nodata will be displayed. The following code shows the use of the CursorTypeproperty:

Private Sub DataClass_Initialize()Set cn = New ADODB.ConnectionSet rs = New ADODB.Recordsetrs.CursorType = adOpenStaticcn.Open “northwind”rs.Open “customers”, cnEnd SubBinding to a simple-bound control (such as a TextBox) doesn’t requirea specific CursorType.
Creating Visual Basic Data Sources: Type the Fields as adVarChar
for SQL Server and Access Databases Instead of adBSTRWhen appending fields to an ADO Recordset object for use with a SQLServer or Access database, type the fields as adVarChar instead ofadBSTR (as shown in some sample code). When reading data out of eitherSQL Server or Access databases, ADO will use the adVarChar type.
Incorrect References for Creating OLE DB ProvidersThe documentation erroneously states that it is possible to set a classmodule’s DataSourceBehavior property to 2 – vbOLEDBProvider to create anOLE DB data provider. The correct values for DataSourceBehavior are 0 -vbNone and 1 – vbDataSource.
The documentation also erroneously refers to a non-existent event in classmodules called OnDataConnection.
Finally, in the topic “Creating the MyDataSource Class,” the step-by-stepexample incorrectly states that you should set DataSourceBehavior to 2 -vbOLEDBProvider. Instead, you should set DataSourceBehavior to 1 -vbDataSource.
To create OLE DB data providers using Visual Basic, use the Provider WriterToolkit included with the OLE DB SDK. For more information, see the OLE DBSimple Provider Toolkit in the Platform SDK Documentation on MSDN.
Finding Help For ADO ObjectsWhen using the ADO objects, (for example, Recordset, Connection, Command,Parameter, ADOR, RDS, and RDS Server object), you cannot get context-sensitive help on the object or its properties, events, or methods. Thatis, if you have a reference to the object and you use one of its features,selecting the code and pressing F1 does not result in a help topic.Instead, you will get either a wrong topic or the “Keyword Not Found”topic.
However, you can get help on any of the object’s properties, events, ormethods by using the online documentation Index:
If the MSDN documentation viewer is not open, on the Help menu, clickContents.Click the Index tab.Type the name of the property, event, or method including the word”collection”, “property”, “event”, or “method” as appropriate.From the list of available topics, select the topic that includes “ADO”in its title.
NOTE: You can also find additional help on other ADO topics, such as theADO object model, by looking in the MSDN Library Table of Contents: openPlatform SDK and under Database and Messaging Services, go to MicrosoftData Access SDK.
SQL Server OLE DB Provider Requires New instcat.sqlBefore using the SQL Server OLE DB data provider, you must run the versionof instcat.sql distributed with Microsoft Visual Basic 6.0 on SQL Server(version 6.5 and later). Instcat.sql is distributed with Visual Basic 6.0and can be found in the \winnt\system32 directory upon installation.
If Instcat.sql is not run on your SQL Server, the provider is unable toretrieve metadata from the SQL Server, and thus will not be able to connectto that server.
Setup for Data Access Applications May Fail on Windows 95/98When redistributing a Visual Basic 6.0 application that includes dataaccess components, setup will fail if DCOM for Windows 95 and Windows 98isn’t present on Windows 9x client machines.
The file Mdac_typ.exe is added to your setup package by the Package andDeployment Wizard if your project includes references to ADO, OLEDB, orODBC (you can check for this on the Included Files page of the wizard).This file installs MDAC 2.0 files on the client computer. MDAC 2.0 requiresDCOM for Windows 95 and Windows 98 in order to function properly, howeverit does not perform a check for this during setup. The setup will fail ifDCOM for Windows 95 and Windows 98 isn’t present on the client machine.Some of the older data access components will be overwritten prior to thefailure, possibly causing older data access applications on the client tofail.
When distributing data access applications for Windows 9x, you need to makesure that DCOM for Windows 95 and Windows 98 is installed on the client.DCOM98.EXE is a self-extracting executable file that installs the updatedDCOM components for Windows 95 or Windows 98. It can be found in the DCOM98directory of the Visual Basic 6.0 CD. This file may be freely distributedwith your Visual Basic application.