Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 23rd, 2004, 05:30 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default dataview display problem

Hi working in ASP.NET .

I am getting prob in update.I am doing filter in my data view and assiging the new values to my filtered row.

finally saving the data set.But after assiging the values to dataview because of some reason my database updation is failed but still my dataview containing the new assigned values only.I am not getting how to roll back the new assigned values.here is my code pl help me


                    dvCPMT = dsCPMT.Tables[ "AP_CPMT" ].DefaultView ;

                    dvCPMT.RowFilter = string.Format(@"CPMTName = '{0}' and JVCode= '{1}' ",oldname,oldjvcode) ;
                    if ( dvCPMT.Count==1)
                    {

                        dvCPMT[0]["IDD"] = IDD;
                        dvCPMT[0]["Ducom"] = Ducom;
                        dvCPMT[0]["Email"] = Email;
                        dvCPMT[0]["SBU"] = SBU;
                        dvCPMT[0]["JVCode"] = JVCode;
                        dvCPMT[0]["Country"] = Country;
                        dvCPMT[0]["SiteName"] = SiteName;

                        this.dataCPMT.SavesDataDataSet();
                        dsCPMT = this.dataCPMT.CPMT();
                        this.dg_bind( );
                        this.DataBind( );
                    }


        internal void SavesDataDataSet( )
        {
            if (null != dsCPMT)
            {

                if (dsCPMT.HasChanges(DataRowState.Added))
                {
                    UpdatesiteTypeDataSet(DataRowState.Added);
                }

                if (dsCPMT.HasChanges(DataRowState.Modified))
                {

                    UpdatesiteTypeDataSet(DataRowState.Modified);
                }
                if (dsCPMT.HasChanges(DataRowState.Deleted ))
                {
                    UpdatesiteTypeDataSet(DataRowState.Deleted);
                }
                // Accept the changes to the Qtype dataset in memory.
                this.dsCPMT.AcceptChanges();
            }
            else
                throw (new Exception("Qtype dataset is null."));
        }









Similar Threads
Thread Thread Starter Forum Replies Last Post
dataview Yasho VB.NET 2002/2003 Basics 1 May 28th, 2007 03:40 AM
Filtering Dataview [Strange Problem] anup_daware ADO.NET 1 August 8th, 2006 07:09 AM
Ordering a dataview Louisa VB.NET 2002/2003 Basics 1 November 11th, 2004 10:04 AM
Help me with Dataview object. aadz5 ASP.NET 1.0 and 1.1 Basics 2 November 20th, 2003 07:52 AM
DataView vivi C# 4 November 10th, 2003 01:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.