Recent

Author Topic: Is the way to transfer data from memo into DBMemo?  (Read 1335 times)

Raf20076

  • Full Member
  • ***
  • Posts: 173
    • https://github.com/Raf20076
Is the way to transfer data from memo into DBMemo?
« on: February 10, 2016, 07:07:08 pm »
Hi guys

I have a question. Is it possible that typing text into memo field - it could be transferred into DBMemo field? My point is that I want to use memo and its properties (which has not DBMemo) and then write code to transfer text into field in database, (I was thinking to use DBMemo which could be hidden - I needed it as a connection to database unless I sort it out how to transfer text directly from memo into database field)

Thanks

balazsszekely

  • Guest
Re: Is the way to transfer data from memo into DBMemo?
« Reply #1 on: February 10, 2016, 07:40:28 pm »
Just before the user saves the data:
Code: Pascal  [Select][+][-]
  1. DbMemo1.Text := Memo1.Text;
It's also possible to save directly to database with a blobstream(if the database server supports it).

Raf20076

  • Full Member
  • ***
  • Posts: 173
    • https://github.com/Raf20076
Re: Is the way to transfer data from memo into DBMemo?
« Reply #2 on: February 10, 2016, 07:48:26 pm »
Just before the user saves the data:
Code: Pascal  [Select][+][-]
  1. DbMemo1.Text := Memo1.Text;
It's also possible to save directly to database with a blobstream(if the database server supports it).
Thanks for that I found another solution

Code: Pascal  [Select][+][-]
  1. Dbf1.FieldByName('memo').AsString:=Memo1.Text;
text from Memo1 is transferred into memo field in DBF1
but database must be in insert mode or edit mode before i enter text into Memo1 which is not a problem.

 

TinyPortal © 2005-2018