Error or Subtle Design in the Code generated by the DataSet Designer - by Thierry Nenin

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 311689 Comments
Status Closed Workarounds
Type Bug Repros 3
Opened 11/21/2007 11:45:58 AM
Access Restriction Public


First of all, I Appreciate enhancments that have been made in the DataSet Designer...

The nes TableAdapterManager feature is really a good stuff but...

If you try to assign a valid already opened connection to this TableAdapterManager, it open again the connection what throw a "Connection already opened connection".

Even if it seams obvious that you try to manage the ConnectionState of a given Connection with this peace of code :

if (((workConnection.State & global::System.Data.ConnectionState.Closed) == global::System.Data.ConnectionState.Closed)) {


workConnOpened = true;


Because the real vaue of the ConnectionState.Closed is 0 (zero), this test will always be true regardless of the workConnection.State value...

Then, the TableAdapterManager always execute workConnection.Open();

Even if the FlagAttribute is applied to this enum, the documentation itself note that the values are not designed to be used as flags...

I suppose this have been done the job :

if ((workConnection.State == global::System.Data.ConnectionState.Broken))




if ((workConnection.State == global::System.Data.ConnectionState.Closed))



workConnOpened = true;


I would also appreciate to can give a name to this TableAdapterManager because I find teious to have fully qualify it when I use more the one typed DataSet in a same method elsewhere in class.

Sign in to post a comment.
Posted by Microsoft on 1/8/2008 at 9:33 PM
Dear Customer,

Thank you for reporting the issue?
We have fixed the ConnectionState issue. It will be available in VS2008 SP1 patch.

For the TableAdapterManager name, unfortunately we are not able to fix it at this time. We will reexame the issue in the next VS release.


John Chen (VS Pro Data team)

Posted by Runningdog on 12/13/2007 at 10:53 PM
This bug prevents multiple datasets from being updated in a single transaction. Without resorting to Distributed Transactions
Posted by northern_sky on 12/9/2007 at 1:57 PM
Yes, i can verify, i just noticed this bug also. Hope for a patch..
Posted by Microsoft on 11/22/2007 at 1:50 AM
Thanks for your feedback. We are escalating this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you,
Visual Studio Product Team