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

PRB: Run-Time Error Message 430 with ADO Redistributed Application

Symptoms
When an ADO application is redistributed, it produces the following run-time error on the user’s computer:

Run-time Error 430
Class does not support automation or does not support expected interface.
Resolution
The application references one version of ADO and redistributes a different version of ADO.

BUG: DataGrid Web Server control wraps when the ItemStyle Wrap property or the HeaderStyle Wrap property is set to false in Visual Basic .NET

Symptoms
When you set the HeaderStyle Wrap or the ItemStyle Wrap property to False, data is still wrapped in the columns of the DataGrid Web control.
Resolution
The wrap functionality occurs for each cell and not for each row of the DataGrid. Therefore, if you set the wrap functionality for all of the DataGrid, text wrapping functionality is not disabled for every row or column.

BUG: All check boxes are cleared in a data-bound CheckedListBox control when rows are added to the DataTable control

Symptoms
You have a data-bound CheckedListBox control on your Windows Form. When you click to select some items in the CheckedListBox control at runtime and then you add a new row to the DataTable control that is bound to the CheckedListBox control, all the check boxes on the control are cleared.
Note Check boxes are not cleared when the CheckedListBox control is not data-bound.
Resolution
This problem occurs because the CheckedListBox control is not designed for data binding.

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: Error When You Access an Array Field of a .NET Structure from COM

Symptoms
When you access an Array field of a structure that is defined in .NET from inside a COM DLL, you may receive the following error message:

“An unhandled exception of type ‘System.ArgumentException’ occurred in ProjectName”
Additional information: Wrong number of arguments or invalid property assignment.
Resolution
Because of the late-bound method that is used in this case, the Visual Basic 6.0 runtime cannot get the type information for the Array field that you are attempting to access.

PRB: “Requested Registry Access Is Not Allowed” Error Message When ASP.NET Application Tries to Write New EventSource in the EventLog

Symptoms
When you use ASP.NET to create a new event source in the event log, you may receive the following error message:

System.Security.SecurityException: Requested registry access is not allowed.
Resolution
By default, the user token of the ASP.NET worker process is ASPNET (or NetworkService for applications that run on Internet Information Services [IIS] 6.0). The problem in the “Symptoms” section occurs because your account does not have the correct user rights to create an event source.