I am using Enterprise Library 2006 , Data Access Application Blocks.
1. I am connecting to Oracle 9i database using DAAB.
2. I retrieve a dataset using the following code in VB.NET.
Dim sqlCommand As String = "SP_GET_BAT CH"
Dim dbCommand As DbCommand
dbCommand = db.GetStoredPro cCommand(sqlCom mand)
ds = db.ExecuteDataS et(dbCommand)
3. I update the dataset using the following code.
ds.Tables["Table"].Rows[0]["PRODUCTION_SEQ UENCE_NO"] = 5111
ds.Tables["Table"].Rows[1]["PRODUCTION_SEQ UENCE_NO"] = 5112
ds.Tables["Table"].Rows[2]["PRODUCTION_SEQ UENCE_NO"] = 5113
ds.Tables["Table"].Rows[3]["PRODUCTION_SEQ UENCE_NO"] = 5114
ds.Tables["Table"].Rows[4]["PRODUCTION_SEQ UENCE_NO"] = 5115
4. I update the database using the following code.
DbCommand updateCommand = db.GetStoredPro cCommand ("SP_MOVE_TURBO _BAT")
db.AddInParamet er(updateComman d, "p_batch_id ", DbType.Int32, "BATCH_ID", DataRowVersion. Current)
db.AddInParamet er(updateComman d, "p_prod_seq no", DbType.String, "PRODUCTION_SEQ UENCE_NO", DataRowVersion. Current);
// Submit the DataSet, capturing the number of rows that were affected
int rowsAffected = db.UpdateDataSe t(productsDataS et, "Table", null, updateCommand, null, UpdateBehavior. Standard);
return rowsAffected;
Now, there are 5 rows whose values are updated.But, the changes at database are reflected only in 4 rows.
This is typical scenario which I am facing.Please help me on this.