TDBRichViewEdit, tags and plain text question
Posted: Thu Jul 05, 2012 1:36 pm
Hi guys,
I need some help to implement TDBRichViewEdit on my new project :
I will use TDBRichViewEdit in “mail merge” mode, users will enter plain text, add variables/tags that was identifies by a code but users will saw a text in the editor (ex: Tag = {TAG01], Text = “<Some text>”).
At this point, everything is ok, I’m using InsertStringTag(“<Some text>”, “{TAG01}”) and it’s fine, but I need to store the text in database in text format for SQL manipulations (String replace of tags from SQL stored procedure).
I have two choices, and I have one question for each :
1. I can store text twice, one field in RVF format (for GUI editing) and another one in TXT format (for SQL manipulation), but how can I get a plain text string with tag names.
Example :
InsertStringTag(“<Some text>”, “{TAG01}”)
Text in TDBRichViewEdit : “Here is the <Some text>”
Plain text wanted : “Here is the {TAG01}”
I try using function GetAllText but it returns “Here is the <Some text>”
2. Is it possible to store plain text in database, and reload it but creating tags ?
Text stored in DB must be : “Here is the {TAG01}”
Text displayed in TDBRichViewEdit after load : “Here is the <Some text>” (tags must be created)
Thank a lot for your help.
I need some help to implement TDBRichViewEdit on my new project :
I will use TDBRichViewEdit in “mail merge” mode, users will enter plain text, add variables/tags that was identifies by a code but users will saw a text in the editor (ex: Tag = {TAG01], Text = “<Some text>”).
At this point, everything is ok, I’m using InsertStringTag(“<Some text>”, “{TAG01}”) and it’s fine, but I need to store the text in database in text format for SQL manipulations (String replace of tags from SQL stored procedure).
I have two choices, and I have one question for each :
1. I can store text twice, one field in RVF format (for GUI editing) and another one in TXT format (for SQL manipulation), but how can I get a plain text string with tag names.
Example :
InsertStringTag(“<Some text>”, “{TAG01}”)
Text in TDBRichViewEdit : “Here is the <Some text>”
Plain text wanted : “Here is the {TAG01}”
I try using function GetAllText but it returns “Here is the <Some text>”
2. Is it possible to store plain text in database, and reload it but creating tags ?
Text stored in DB must be : “Here is the {TAG01}”
Text displayed in TDBRichViewEdit after load : “Here is the <Some text>” (tags must be created)
Thank a lot for your help.