Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
|
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 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 September 22nd, 2004, 04:55 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 143
Thanks: 0
Thanked 1 Time in 1 Post
Default Haschanges / Getchanges - weird issue

Good day,

For a few days now, I've been banging my head against my keyboard over a very weird error I'm experiencing.

The basics:

I use a 'New' button to add a row to my dataset. Looking at the database, I can see the new row added with the default value.

Next, I change one of the fields of this newly added row. Using the following code, I send the updated row to the dataset:

Code:
If DsWerkplek1.HasChanges(DataRowState.Modified) = True Then
        Try

        Dim i As Integer
        i = daWerkplek.Update(DsWerkplek1.GetChanges(DataRowState.Modified))
        MsgBox(i)
        Catch ex As Exception
        End Try
After this snippet completes, I throw a CommitChanges to the dataset.

Overall, this works just fine. However, in a very specific case, while debugging, the IF statement returns 'true', meaning the dataset
indeed DOES have changes. However, the GetChanges refuses to yeld any results whatsoever, and the exception will be fired.

I am so totally lost, and hope someone, somewhere ran into the same problem and found a solution.

:(

Thanks.

Peter

__________________
http://entropia-online.blogspot.com/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird search panossss PHP How-To 1 February 21st, 2008 06:41 AM
weird problem! Please Help johnjohn Classic ASP Databases 5 December 21st, 2004 10:27 AM
Weird Errors kervinshim Classic ASP Databases 3 April 25th, 2004 04:08 AM





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