473,657 Members | 2,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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.
Mar 29 '07 #1
0 1164

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

Similar topics

0
996
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
5869
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 I get the message "A strong SA password is required for security reasons. Please use SAPWD switch to supply the same" Currently the sa password is Abc/def/ghk1
2
4373
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 Enterprise Library seems pretty close to what I am used to in Java but I am not sure how to create strongly-typed DataSets. I see that I can use the LoadDataSet method from a Microsoft.Practices.EnterpriseLibrary.Data.Database but I am not clear on how...
2
1706
by: Pierre | last post by:
Hello, Is it possible to use the Microsoft Data Access Application Blocks with MySQL ? Thanks. Pierre.
18
4111
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 and has a reference to WARC_Standard_Functions which holds the day to day functionality and has references to Microsoft.Practices.EnterpriseLibrary.Data.dll and Microsoft.Practices.EnterpriseLibrary.Common.dll I want WARC_Subs_Reporting.dll...
2
1012
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 it in my app created using VS 2003 and I get the following error: System.Security.SecurityException: Requested registry access is not allowed Please advice,
2
3017
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 DAAB in this case? What can be the implication in using it any disadvantage/Drawbacks? Is it the same as SQL Helper or more than that? Regards
5
1324
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 calls from the VB6 project to the .net project work fine but any call to a method that replies upon the DAAB fails with the message “The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Data.DatabaseConfigurationView' threw an...
5
3122
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 Oracle? Probably not. How can I structure my data access layer so the app will be switching easily between those two databases with a locally stored db connection string? How about the following? Thanks for your suggestions.
0
8411
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8613
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.