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

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.

BUG: Data Report Not Always in WindowList

Symptoms
An MDIFORM does not show the child form in the WindowList menu if the childform is a Data Report. If the Data Report is minimized and then returned toa normal state, it will show up in the WindowList.
Resolution
To work around this problem, add code to your program that minimizes thereport prior to opening the report in normal mode. Refer to the Steps toReproduce Behavior section of this article for sample code on thisworkaround.

BUG: Data Form Wizard Mishandles ‘-’ in Table or Field Names

Symptoms
When loading a form created by the Data Form Wizard, you may receive one ofthe following error messages:

Run-time error ‘-214217900 (80040e14)’, “Syntax error in FROM clause”
-or-

Run-time error ‘-214217904 (80040e10)’, “No value given for one or morerequired parameters”
Resolution
If the data source for a form created by the Data Form Wizard containsa dash ‘-’ in its name or in the name of a field, it is required that thedata source name or field name be delimited by brackets in a SQL statement.The Data Form Wizard does not include brackets around these names.

BUG: Data Environment: MSHFlexGrid Rebinding Data

Symptoms
Attempting to rebind the MSHFlexGrid to a different Data Environment as theDataSource property results in an error:

Runtime Error 30022, The Hierarchical FlexGrid does not support therequested type of data binding.
Resolution
If the MSHFlexGrid.DataMember is set to a Data Environment other than theoriginal, the MSHFlexGrid attempts to rebind the data using the previousDataSource property setting. Because the same Command does not exist in thesubsequent Data Environment, an error results.

BUG: Data Control Validate Event Not Fired on Unloading Form

Symptoms
A form containing a bound Data Control disables the Validate event when theform is unloaded.
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 Base asit becomes available.

BUG: Data Control NoMatch Equals True Returns Error

Symptoms
When the NoMatch method of the Data Control returns “True,” the Seek methodwill report a run-time error “No Current Record.”
Resolution
The user can work around this problem by trapping the Data Control’s errorevent and repositioning to an existing record after the seek failure.