Hello my fellow Daniwebies!

I have a curious, possibly unique, and odd problem for everyone!

We support an ASP.NET application which is using VB.NET for code behind.
We use LINQ to SQL and classed object for the data retreival.

I have an object called...myObject which is being deleted:

Public Shared Sub Delete(ByVal moIn As myObject)
    Try
       Dim db As New DataBaseDataContext()

       db.myTable.Attach(myObject)
       db.myTable.DeleteOnSubmit(myObject)
       db.SubmitChanges()

       db = Nothing
    Catch ex As Exception
        Throw ex 'Exception is handled on front end
    End
End Sub

The code fires successfully and the object is 'deleted'.

Here is the odd thing: When checking from SQL Server, the deleted row is still in the database BUT not inside the application.

In other words; The object is deleted locally and never retreived - even if the application is restarted.

What in the world is going on here?

May be when someone delete record ,instead of deleting records code is setting any flag in the table.

to get the clue , you could check the code which is retriving records from the db. there may be any filter criteria.

Regards

commented: That was the same thought process I had as well. +8

I have checked to see if the code was simply setting a flag beforehand. To my astonishment it is deleting the record and nothing else!

I am starting to think that the application is possessed by the evil MS Casper.

Anyone know the number to the Ghost Busters?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.