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

BUG: Run-Time Error Message -2147417848 (80010108) When Passing Array of Dictionary Objects

Symptoms
You have a Visual Basic ActiveX DLL that has a method that takes an array of Scripting Dictionary Objects as an argument. It may work fine when your Visual Basic client is run in the Visual Basic integrated development environment (IDE) by using this method, but when you run it as a compiled application, you get the following run-time error message:

Run-time error ‘-2147417848 (80010108)’:
Method ‘~’ of object ‘~’ failedThis only occurs when you use late binding to call the method.
Resolution
Use early binding to work around the problem.

BUG: Run-Time Error 380 “Invalid Property Value” with MaskEdBox

Symptoms
With Microsoft Visual Basic 4.0, when you set the Text property of a MaskEdit control at run-time, you receive the following error.

Run-time Error 380:
Invalid Property Value
Resolution
This error occurs under the following circumstances:
The Visible property of the Mask Edit control is set to False atdesign-time.
-and-A later version of MSMASK32.OCX is installed. The error occurs withMSMASK32.OCX version 5.00.3714, which ships with Microsoft Visual Basic5.0.

BUG: Painting Model for BitBlt and StretchBlt Changed for VB6

Symptoms
A program that paints correctly using the BitBlt or StretchBlt APIfunctions under Visual Basic 5.0 might no longer work under Visual Basic6.0. Under Visual Basic 5.0, the bitmap is correctly displayed no matterwhether the AutoRedraw property of the Form is set to True or False.However, under Visual Basic 6.0, if the AutoRedraw property is set to True,nothing is displayed and no error messages are generated.
Resolution
In Visual Basic 6.0, set the Form’s AutoRedraw property to False or callRefresh to view the result after calling BitBlt or StretchBlt if theAutoRedraw property is set to True.

BUG: One or more columns in the Results pane appear to be empty when you retrieve data in Visual Studio .NET or Visual Studio 2005

Symptoms
In Microsoft Visual Studio .NET or Visual Studio 2005, one or more columns in the Results pane appear to be empty when you retrieve data from a Microsoft SQL Server 2000 database table. This problem occurs when the following conditions are true:The database table contains a column of type CHAR, NCHAR, VARCHAR, or NVARCHAR.The column contains data that has more than 900 characters.
Resolution
The cells of the Results pane in Visual Studio .NET or Visual Studio 2005 cannot display data that has more than 900 characters.

BUG: Expanding Stored Procedures in Data View Window Causes GPF

Symptoms
Clicking the plus sign to expand a stored procedure in the Data View window in either Visual Basic, Visual InterDev, or Visual J++ generates the following error message if the stored procedure contains calls to extended stored procedures that return something other than 0 or 1, such as xp_cmdshell:

Devenv.exe – Application ErrorThe instruction at “0×412406f3″ referenced memory at “0×00000006″. The memory could not be “read”.
Resolution
Clicking the plus sign executes the stored procedure to enumerate the parameters and tables for the stored procedure. When the data environment tries to execute xp_cmdshell it generates an error.
NOTE: This problem does not occur with SQL Server 7.0 or later. It also does not occur under a Microsoft Windows 2000 environment.

BUG: Error When Data Control Is Set to a Wrong Text Database

Symptoms
A 16-bit Visual Basic for Windows version 4.0 program containing a Datacontrol with a Connect property set to Text and the DatabaseName propertyset to a non-text database generates an application error when run. Theapplication error displays the message – VB caused a General ProtectionFault in module VB.EXE at 003F:2106. Choose close. VB will close.
A 32-bit Visual Basic for Windows version 4.0 program with the same controlset to the same property displays the error message – Couldn’t find object.
Resolution
Microsoft has confirmed this to be an issue in the Microsoft productslisted at the beginning of this article. Microsoft is researching thisissue and will post new information here in the Microsoft Knowledge Baseas it becomes available.