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 ‘error message’

BUG: Data Form Wizard Through Application Wizard Omits ADO Reference

Symptoms
When you run an application that is created using the Visual Basic Application Wizard, you receive the following error message:

Compile error: User-defined type not defined
Resolution
The Application Wizard allows for the creation of forms via the Data FormWizard. When a form is created in this manner, a reference to ADO is notadded to the project.

PRB: Run-Time Error Message 3705 Occurs When Trying to Set the ActiveConnection Property of an ADO Recordset to Nothing

Symptoms
When you attempt to disconnect an ADO Recordset by setting its ActiveConnection Object property to Nothing, the following error message might appear:

Run-time error ‘3705′: Operation is not allowed when the object is open.
Resolution
Only client-side ADO recordsets can be disconnected. The specified error occurs only when you attempt to disconnect a server-side ADO recordset.

BUG: Element may cause Data View to generate an error message

Symptoms
When you view an XML document with Data View in the Microsoft Visual Studio .NET integrated development environment (IDE), you may receive the following error message:

Although this XML document is well formed, it contains structure that Data View cannot display.
The grid cannot show the data correctly because of the unsupported character “.” in element name(s).
Resolution
The XML document has an element name that contains a period (.), and the period (.) is an unsupported character.

PRB: Error When You Use MS Data Shape Provider in Data Environment

Symptoms
When you try to use the Query Designer against the MS Shape Provider inthe Data Environment, the following error message is returned:

Query Designer encountered a ADODB.Properties error:
Query Designer encountered a ADODB.Properties error:
Query Designer encountered a ADODB.Properties error:
ADO could not find the object in the collection corresponding to the
name or ordinal reference requested by the application.(11)Upon clicking OK, a second error message is returned:

Object Variable or With block variable not set.
Resolution
This behavior is by design.

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.