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

BUG: Repeatedly Opening and Closing DAO Recordset Increases Connections on SQL Server

Symptoms
The number of connections opened on SQL Server increases indefinitely if a Microsoft Data Access Objects (DAO) recordset is opened and closed repeatedly when you use DAO version 3.6. This does not happen if you use DAO version 3.51. You may see this behavior if you use sqlpassthrough in which the connection string is specified in the OpenDatabase statement.
Resolution
Use a Querydef to create the connection instead of creating the connection in the OpenDatabase statement.

BUG: GPF in Data Access Objects After You Install SQL Server Client

Symptoms
If you install the Spanish version of the SQL Server 7.0 Client utilities on a computer that is running Microsoft Windows 95 OEM Service Release 2 (OSR2), a General Protection Fault (GPF) error occurs when you use Data Access Objects (DAO) to open a database.
This problem does not occur on computers that are running the Spanish version of Microsoft Windows NT 4.0, nor does it occur on computers that are running the English version of Windows 95.
Resolution
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

BUG: Error “Unable to Register MSADO15.TLB” If You Use a PDW Package to Install a VB Application

Symptoms
When you use a package that you created with the Package and Deployment Wizard (PDW) to install a Visual Basic application, you may receive the following error message (or similar) during the installation:

Unable to register MSADO15.TLBThis error message may reference any of the following files:MSADO15.TLBMSADO20.TLBMSADO21.TLBMSADO25.TLB
Resolution
The Package and Deployment Wizard adds the type library (.tlb) file to the package because the type library is referenced in your project. The PDW also erroneously assigns the $(DLLSelfRegister) registration macro to the type library in the Setup.lst file that is created for your installation package.
Most commonly, this problem occurs when your Visual Basic project contains a reference to a version of ActiveX Data Objects (ADO) that is earlier than the latest installed version. The reference for the latest installed version of ADO points to MSADO15.DLL. Earlier version references point to the above-mentioned ADO type library files.

BUG: Controls are located at the upper-left corner of a form after you run the Visual Basic .NET 2002 Upgrade Wizard

Symptoms
On a computer that has Microsoft Visual Studio .NET 2002 installed, you may install Microsoft .NET Framework version 1.1 in addition to Microsoft .NET Framework version 1.0. After you run the Microsoft Visual Basic .NET Upgrade Wizard to upgrade a Microsoft Visual Basic 6.0 project, all the controls may be located at the upper-left corner of the form. Also, the Task List window may contain multiple instances of the following design-time error:

Object type cannot be converted to target type. This behavior only occurs at design time. At run time, all the controls are in their original locations.
Resolution
The Visual Basic .NET Upgrade Wizard creates an XML-based resource format (.resx) file for each of your Visual Basic 6.0 forms. This .resx file contains a reference to the latest version of the System.Windows.Forms.dll assembly. If you installed .NET Framework version 1.1 in addition to .NET Framework version 1.0 on your computer, the Visual Basic .NET Upgrade Wizard adds a reference to version 1.0.5000.0 of the System.Windows.Forms.dll assembly in the .resx file. However, Visual Studio .NET 2002 loads a reference to version 1.0.3300.0 of the System.Windows.Forms.dll assembly. Because of this difference in the assembly versions, the Windows Forms Designer ignores the code that sets the Location property for each control. Therefore, each control is located at the upper-left corner of the form.