Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 311522 - Last Review: March 9, 2006 - Revision: 1.4
BUG: You cannot create calculated expressions on DataSet objects in the Schema Designer
This article was previously published under Q311522
This article refers to the following Microsoft .NET Framework Class Library namespace:
SYMPTOMS
- When you add an instance of a calculated expression in the Schema Designer and you preview that expression, the following error message appears and you are not allowed to create the instance.
Exception has been thrown by the target of an invocation
-or-
- When you modify a DataSet object to add a calculated expression, the form will not load and the Form Designer will display the following error message:
An exception occurred while trying to create an instance of DataSet
If this occurs, you must fix the problem manually before you can see the form again.
CAUSE
The
DataSet tries to use rows that have not yet been defined to create the expression.
RESOLUTION
To work around this problem, create the expressions
after you instantiate the
DataSet. After you create the tables and rows in the
DataSet constructor, the expressions will be accepted. For example:
Dim objDS as new DataSet1
objDS.myTable.AvgColumn.Expression = "avg(Child.Values)"
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
APPLIES TO
- Microsoft ADO.NET (included with the .NET Framework)
- Microsoft .NET Framework 1.1
| kbtshoot kberrmsg kbbug kbmisctools kbpending kbreadme kbsystemdata KB311522 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please