Exforsys
+ Reply to Thread
Results 1 to 3 of 3

VB.NET 2005 (Database Deletion issues)

This is a discussion on VB.NET 2005 (Database Deletion issues) within the Microsoft .NET forums, part of the Programming Talk category; Hi all, I am new to these forums and I am having some trouble with trying to delete records from ...

  1. #1
    PlanTec is offline Junior Member Array
    Join Date
    Jul 2006
    Answers
    1

    VB.NET 2005 (Database Deletion issues)

    Hi all,

    I am new to these forums and I am having some trouble with trying to delete records from an oracle table using the below syntax/object

    DataSetXX.TableYYY.Rows(n).Delete()

    What is happening is the command is completing sucessfully yet the records are not being deleted. Is there something else I need to add to convert these tagged records for deletion into actual deletion?

    I am using the Oracle native driver, I have also tried the OLE driver as well.

    Any help is appreciated.

    Regards,

    Kent Lawrence.


  2. #2
    techguru is offline Senior Member Array
    Join Date
    Mar 2005
    Answers
    112
    Quote Originally Posted by PlanTec
    Hi all,

    I am new to these forums and I am having some trouble with trying to delete records from an oracle table using the below syntax/object

    DataSetXX.TableYYY.Rows(n).Delete()

    What is happening is the command is completing sucessfully yet the records are not being deleted. Is there something else I need to add to convert these tagged records for deletion into actual deletion?

    I am using the Oracle native driver, I have also tried the OLE driver as well.

    Any help is appreciated.

    Regards,

    Kent Lawrence.
    Hello Kent,

    it's kind of tricky when it comes to oracle database... can you send me the source code or paste the code ...

    Thanks,
    John


  3. #3
    techvinny is offline Moderator Array
    Join Date
    Dec 2010
    Answers
    56
    Looks like you are missing to call the AcceptChanges method on the datatable after deleting the row

    Code:
    DataSetXX.Tables[0].Rows(n).Delete();
    DataSetXX.Table[0].AcceptChanges();
    AcceptChanges is used to commit all the changes made to the datatable since the last time AcceptChanges was called.

    Quote Originally Posted by PlanTec View Post
    Hi all,

    I am new to these forums and I am having some trouble with trying to delete records from an oracle table using the below syntax/object

    DataSetXX.TableYYY.Rows(n).Delete()

    What is happening is the command is completing sucessfully yet the records are not being deleted. Is there something else I need to add to convert these tagged records for deletion into actual deletion?

    I am using the Oracle native driver, I have also tried the OLE driver as well.

    Any help is appreciated.

    Regards,

    Kent Lawrence.



    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...