Board index » delphi » DBMEMO not working correctly

DBMEMO not working correctly

Hello

Hope this be the correct group.

Im using a form to change values to a table (Firebird)
When dataset is in edit mode I allow user to create  another form (in fact I show a button which creates the new form)containing a DBMemo. Datasource and Datafield are set in runtime. (because I want to use this form in other forms)

The problem is that it can't let user to change value to field. (this field is a varchar)

This happens just when table changes to edit BEFORE to create my second form. If it is created before, DBMemo works fine.

If I add a DBEdit to my second form it works fine. In fact I could use this component but it works just for 1 line. Text could use several lines.

I tried to recreate the problem using paradox and access but they works well.

What can I do? Is it correct to use a DBMemo with varchars? If not, how could I show severals lines with a DBEdit?

Hope to have been clear enough.

Thanks in advance!!!

Federico

 

Re:DBMEMO not working correctly


On 7 May 2003 15:59:20 -0700, Federico Crdenas <fcarde...@qually.com.mx>
wrote:

Quote
> Im using a form to change values to a table (Firebird)
> When dataset is in edit mode I allow user to create  another form (in
> fact I show a button which creates the new form)containing a DBMemo.
> Datasource and Datafield are set in runtime. (because I want to use this
> form in other forms)

> The problem is that it can't let user to change value to field. (this
> field is a varchar)

> This happens just when table changes to edit BEFORE to create my second
> form. If it is created before, DBMemo works fine.

> If I add a DBEdit to my second form it works fine. In fact I could use
> this component but it works just for 1 line. Text could use several
> lines.

> I tried to recreate the problem using paradox and access but they works
> well.

> What can I do? Is it correct to use a DBMemo with varchars? If not, how
> could I show severals lines with a DBEdit?

There's probably an answer that would let you use a TDBMemo here, but it
would be even easier for this small dialog to us a TMemo (i.e. non-data-
aware) and when the user clicks OK on the dialog just assign the memo text
to the field, e.g.

  Query1.FieldByName('MyVarCharField').AsString := Memo1.Lines.Text;

--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
Newgroup Guidelines: info.borland.com/newsgroups/guide.html
Powered by Delphi and Interbase: www.logicfundamentals.com/RadBooks.html
"Democracy, without that guarantee of liberty, is merely a method of
selecting tyrants." - Alan Nitikman

Other Threads