Board index » delphi » EASY: 'Before Post' problem

EASY: 'Before Post' problem

I'm using Interbase 5 with Delphi 3.  My problem is that I have a DBEdit
box I update with text programmatically on the 'Before Post' event of a
particular TTable.  The updated text  is there in the DBEdit box at the
end of the 'Before Post' event, but disappears between the end of
'Before Post' and the beginning of 'After Post'.  It seems that the
updated text was 'rolled back' during the post.  How do I make the
changes I made to the DBEdit box in the 'Before Post' event 'stick'
during the post?  I'm sure this is an easy one, but I'm just missing
something...  Thanks in advance!

 

Re:EASY: 'Before Post' problem


Don't assign a value to the Text property of the DBEdit.  Instead assign it
to the field in the table.

Table1.FieldByName('SomeField').Value := 'abc';

--
Bill

(TeamB cannot answer questions received via email.)
(To contact me for any other reason remove nospam from my address)

Re:EASY: 'Before Post' problem


Quote
> Don't assign a value to the Text property of the DBEdit.  Instead assign it
> to the field in the table.

> Table1.FieldByName('SomeField').Value := 'abc';

What if I'm using Interbase 5 text blob field with a DBMemo?  I don't think I
can address the lines like I do the control (eg.
taTable.fieldbyname('MyTextBlobField').Value :=
taTable.fieldbyname('MyTextBlobField').Lines.Add('Yada Yada Yada');  How do I
approach this?  Thanks in advance.

Re:EASY: 'Before Post' problem


There is no problem that I know of using the Lines property of a DBMemo that
is displaying an IB memo.  By the way, you might get better help in the
future if your post your question in the database.sql newsgroup which is
devoted to client/server issues.

--
Bill

(TeamB cannot answer questions received via email.)
(To contact me for any other reason remove nospam from my address)

Other Threads