Board index » delphi » DBMemo fields not saving changes

DBMemo fields not saving changes

Hi folks:
I am using a couple of DBMemo fields in an app I just wrote.  When I hit
tab to move to the next field, I lose all the changes I have made.  In
contrast, the other fields keep all the changes on leaving the field.  I
suppose I could attatch an event handler to update the fields on leaving,
but it seems strange that I would have to for the DBMemo components only.
Does anyone have any information about this?

Thanks in advance,
Ken

 

Re:DBMemo fields not saving changes


It is definitaly a BUG in Delphi 2.0. Tech support claims that it is an ODBC
problem, but I've tested it out with Interbase, Sybase Native and ODBC drivers
with the same negative results.

SOLUTION: Use a TMemo component and add a BeforePost event to your TTable with
the following code:

DataSet.FieldByName('table_column').AsString := MessageMemo.Text;

You will also have to update the TMemo from the datasource on a change in
record and on a FormCreate.

Note: this BUG sucks!             8^)

- Greg

In article <4mjk1b$...@newsbf02.news.aol.com>, kpree...@aol.com (KPReeder)
wrote:

Quote
>Hi folks:
>I am using a couple of DBMemo fields in an app I just wrote.  When I hit
>tab to move to the next field, I lose all the changes I have made.  In
>contrast, the other fields keep all the changes on leaving the field.  I
>suppose I could attatch an event handler to update the fields on leaving,
>but it seems strange that I would have to for the DBMemo components only.
>Does anyone have any information about this?

>Thanks in advance,
>Ken

Other Threads