473,378 Members | 1,451 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Problem in updating dataset using DAAB (enterprise library 2006).

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_BATCH"
Dim dbCommand As DbCommand
dbCommand = db.GetStoredProcCommand(sqlCommand)
ds = db.ExecuteDataSet(dbCommand)

3. I update the dataset using the following code.
ds.Tables["Table"].Rows[0]["PRODUCTION_SEQUENCE_NO"] = 5111
ds.Tables["Table"].Rows[1]["PRODUCTION_SEQUENCE_NO"] = 5112
ds.Tables["Table"].Rows[2]["PRODUCTION_SEQUENCE_NO"] = 5113
ds.Tables["Table"].Rows[3]["PRODUCTION_SEQUENCE_NO"] = 5114
ds.Tables["Table"].Rows[4]["PRODUCTION_SEQUENCE_NO"] = 5115

4. I update the database using the following code.
DbCommand updateCommand = db.GetStoredProcCommand ("SP_MOVE_TURBO_BAT")
db.AddInParameter(updateCommand, "p_batch_id", DbType.Int32, "BATCH_ID", DataRowVersion.Current)
db.AddInParameter(updateCommand, "p_prod_seqno", DbType.String, "PRODUCTION_SEQUENCE_NO", DataRowVersion.Current);
// Submit the DataSet, capturing the number of rows that were affected
int rowsAffected = db.UpdateDataSet(productsDataSet, "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.
Mar 29 '07 #1
0 1141

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Vinny_Davis | last post by:
Hi - I installed Enterprise Library successfully. Under the DAAB area I am seeing two VS solution links. One says "Data" and another says "Data Design". What is the difference? Thanks, Vinny
6
by: John Morgan | last post by:
I urgently need tom use SP3a upgrade the instance of SQLServer200 MSDE runing on my local machine but I am having problems in doing so. My first problem is that when I start the set up procedure...
2
by: David | last post by:
I have been developing applications with Java for quite a while but I am new to .NET development. I am trying to learn the ".NET way" of creating Strongly Typed Objects from a database. The...
2
by: Pierre | last post by:
Hello, Is it possible to use the Microsoft Data Access Application Blocks with MySQL ? Thanks. Pierre.
18
by: Chubbly Geezer | last post by:
Now I'm coming from a VB6 background so I may be overlooking something here. I have functionality that is contained with 2 VB 2005 dll's. WARC_Subs_Reporting.dll which handles report functions...
2
by: stephen | last post by:
Hi, Does "Microsoft Enterprise Library June 2005" for creating the "Data Access Application Block (DAAB)." work only with VS 2005? I created a "dataconfiguration.config" using DAAB and using...
2
by: Kausar | last post by:
Hello All, My question is in what scenerio we should use DAAB? we are going to develop a enterprise Web Application in .Net Framework 2.0 which contains approx 200 tables. Is it sensible to use...
5
by: Dick | last post by:
I have a .net 2005 class library project that relies upon the Data Access Application Block from the 2006 Enterprise Library. I want to call my project from a legacy VB6 application. Simple...
5
by: John | last post by:
Hi, I am developing a windows app using C# 2005. This app uses SQL Server or Oracle database depending on the what the user is using. Can I create one typed dataset and use it for SQL Server and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.