ben.kansas
9th January 2009, 23:17
Hi All,
I am attempting to update a table using data from a flat file via the DAL.
My code reads:
error.found = dal.change.object("tiedm110")
if error.found then
error.mess = "Could not do 'change object' for refdes line"
error.mess = dal.error.file
endif
dal.set.field("tiedm110.eitm", mitm)
dal.set.field("tiedm110.revi", revi)
dal.set.field("tiedm110.pono", pono)
dal.set.field("tiedm110.rdsp", rdsp)
error.found = dal.save.object("tiedm110")
if error.found then
while dal.get.first.error.message( msg, code) >= 0
message(msg)
endwhile
error.mess = "Could not save REFDES line"
error.mess = dal.error.file
else
commit.transaction()
endif
When the script try to execute the dal.save.object() function it throws the error that the record is not locked.
I would think that the dal.save.object() function would lock or delay lock the record prior to saving the object.
How can I lock the record so that the record can be modified and then committed to the database?
Thanks for your time,
Ben
I am attempting to update a table using data from a flat file via the DAL.
My code reads:
error.found = dal.change.object("tiedm110")
if error.found then
error.mess = "Could not do 'change object' for refdes line"
error.mess = dal.error.file
endif
dal.set.field("tiedm110.eitm", mitm)
dal.set.field("tiedm110.revi", revi)
dal.set.field("tiedm110.pono", pono)
dal.set.field("tiedm110.rdsp", rdsp)
error.found = dal.save.object("tiedm110")
if error.found then
while dal.get.first.error.message( msg, code) >= 0
message(msg)
endwhile
error.mess = "Could not save REFDES line"
error.mess = dal.error.file
else
commit.transaction()
endif
When the script try to execute the dal.save.object() function it throws the error that the record is not locked.
I would think that the dal.save.object() function would lock or delay lock the record prior to saving the object.
How can I lock the record so that the record can be modified and then committed to the database?
Thanks for your time,
Ben