I have an object which creates a line in an sql table. using that object i can create and modify the record. I want to add a sub that would delete the record and than dispose the object. Something like this:
class myRecord
int recordId
sub new(con as sqlconnection,col1,col2,col3)
sqlcommand ("insert into....")
recordId=.....
end sub
sub modify(colname,newvalue)
sqlcommand("update.... where...")
end sub
sub delete()
sqlcommand(delete from....where recordId....)
HERE I WANT TO TURN THE OBJECT into null or nothing
end sub
end class
dim record as myrecord(con,"val1","val2","val3")
myrecord.delete()
can I destroy or turn object to null from within the object?