How to reset a value, empty a parameter...

[code] dim dr as new DatabaseRecord
dim d as New date
DIM intLastID As Integer
// KEYWORD ACCESS TOOL
dr.Column(“strName”) = “www.url.lcom”
dr.Column(“dteCreated”) = d.ShortDate
dr.Column(“value3”) = monkeyBusiness.getMonkey <— new line
db.InsertRecord( “KATURL”,dr )
intLastID = db.lastRowID

    dim dr2 as new DatabaseRecord
    dr2.Column("strName") = "keyword 1"
    dr2.Column("intURLID") = str(intLastID)
    dr2.Column("dteCreated") = d.ShortDate
    db.InsertRecord( "KATKeyword",dr2 )
    
    dr2.Column("strName") = "keyword 2"
    dr2.Column("intURLID") = str(intLastID)
    dr2.Column("dteCreated") = d.ShortDate
    db.InsertRecord( "KATKeyword",dr2 )
    [/code]

I just added this new line (marked) and I got the error message “table KATKeyword does not contain the column value3”

To solve this, I created dr2…
But now I ask, is there a way to reset the values added in “dr”?

dr.release
dr.EmptyAll
dr.abandon

Something…??

dr = Nil

Just a guess. But why do you want to? :slight_smile:
When you call “new” a new “dr” will be created and destroyed when it goes out of scope.

dr = nil dr = new DatabaseRecord

Tack!! :slight_smile:

It’s to speed up and secure copy/paste.