Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Object > DB4o - Can't de...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 274 of 363
Post > Topic >>

DB4o - Can't delete object stored in global variable

by "Bryan" <bryanvick@[EMAIL PROTECTED] > Apr 7, 2006 at 04:35 PM

I have a class Human.  A form lists all humans.  When the user double
clicks on a human, I open another form showing the details of that
human.
There is a global variable on the detail form called CurrentHuman of
type human.  When the user double clicks a human in the list on the
first form, I do a search to find the object  and set the global
variable 'CurrentHuman' = to this object.
Now when I am in the detail form I have a button that deletes the
object 'CurrentHuman' but it is not working.  Here is some of my code:

This finds the object that the user double cliked on by searching for
the unique ID property (EntityID is the ID value of the human that was
double clicked). The object found here is sent to the 'CurrentHuman'
global variable on the detail form
            Dim results As ObjectSet = db.Get(GetType(Human))
            For Each h As Human In results
                If h.ID = EntityID Then
                    Return h
                    Exit Function
                End If
            Next

Here is what I have to delete the human object
    db.Delete(CurrentHuman)

This is not working however, what could be going wrong?
 




 1 Posts in Topic:
DB4o - Can't delete object stored in global variable
"Bryan" <bry  2006-04-07 16:35:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 16:39:37 CDT 2008.