Does Microsoft accept bug reports for their Application Blocks?

B

BStorm

I ran into a maddening bug that I finally tracked down to Microsoft's Data
Access Blocks. It is in the SQL Helper UpdateDataSet method as follows:

Microsoft Code:

#region UpdateDataset
public static void UpdateDataset(SqlCommand insertCommand, SqlCommand
deleteCommand, SqlCommand updateCommand, DataSet dataSet, string tableName)
{
if( insertCommand == null ) throw new ArgumentNullException(
"insertCommand" );
if( deleteCommand == null ) throw new ArgumentNullException(
"deleteCommand" );
if( updateCommand == null ) throw new ArgumentNullException(
"updateCommand" );
if( tableName == null || tableName.Length == 0 ) throw new
ArgumentNullException( "tableName" );
// Create a SqlDataAdapter, and dispose of it after we are done
using (SqlDataAdapter dataAdapter = new SqlDataAdapter())
{
// Set the data adapter commands
dataAdapter.UpdateCommand = updateCommand;
dataAdapter.InsertCommand = insertCommand;
dataAdapter.DeleteCommand = deleteCommand;
// Update the dataset changes in the data source
dataAdapter.Update (dataSet, tableName);
// Commit all the changes made to the DataSet
dataSet.AcceptChanges(); // THIS IS A BUG!!!
}
}
#endregion

LAST LINE SHOULD BE:

dataSet.Tables[tableName].AcceptChanges();

The Microsoft version is committing changes to ALL tables in the dataset
prior to giving an opportuity to update the database with them. Return from
this metod shows their every table RowState as "Unchanged".
 
J

John Beyer

BStorm said:
I ran into a maddening bug that I finally tracked down to Microsoft's Data
Access Blocks. It is in the SQL Helper UpdateDataSet method as follows:

Report it in the GotDotNet (www.gotdotnet.com) workspace for the DAAB...
That would be where the people responsible might see it...

HTHs..

John
 
K

Klaus H. Probst

I've found a few as well. This one looks like it was a pain to track down =)

I'll try and ping someone with this, but let's not hold our breaths. I have
no idea who is in charge of these or what their release schedule is, if it
exists.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top