monz
asked on
updating database table using transaction
i use delphi 5
i want update a database table using database transactions
i have a datamodule with a database component (database1) and some table components (table1, table2...)
i wrote for exemple
datamodule.table1.database .starttran saction;
datamodule.table1.edit;
datamodule.table1.fieldbyn ame('NAME1 ').AsStrin g := 'something';
......
datamodule.table1.post;
datamodule.table1.database .commit;
the error message i receive is "Nested transaction not supported"
why?
is there an implicit call to starttransaction inside the edit procedure?
i want update a database table using database transactions
i have a datamodule with a database component (database1) and some table components (table1, table2...)
i wrote for exemple
datamodule.table1.database
datamodule.table1.edit;
datamodule.table1.fieldbyn
......
datamodule.table1.post;
datamodule.table1.database
the error message i receive is "Nested transaction not supported"
why?
is there an implicit call to starttransaction inside the edit procedure?
ASKER
nothing is changed
when i call the post metod i receive the same erro message
when i call the post metod i receive the same erro message
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
monz:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
try
if datamodule.table1.database
datamodule.table1.database
datamodule.table1.database
datamodule.table1.edit();
datamodule.table1.First();
while not datamodule.table1.eof do
Begin
datamodule.table1.fieldbyn
datamodule.table1.post();
End;
if datamodule.table1.database
datamodule.table1.database
except
on e:exception do
begin
ShowMessage(e.message)
datamodule.table1.database
end;
end;
hope it gives a hunt to you..