Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 10 of 11 total |
Alter field type |
Wed, Jul 15 2015 4:53 AM | Permanent Link |
Hershcu Sorin | Hi
I alter a field type from VarChar to CLOB. On the application UI I change the component, attached to that field, from TDBMemo to TDBRichEdit because I need the edit options of this component. Why I can't see the old text value of this field on the TDBRichEdit component. On the EDB manager I can see the old value. If I add new text to the TDBRichEdit it's appear ok. What I miss? Thanks Sorin |
Wed, Jul 15 2015 5:10 AM | Permanent Link |
Adam Brett Orixa Systems | Sorin
The RichEdit component is complex. It shows data from a DB field, but it also uses complex escape characters to determine how attributes like bold or italic text are displayed. In Delphi the RichEdit Component has a property (I think called "PlainText" ??? or something similar) if you set this to "true" it may allow you to see the existing data. You may need to UPDATE existing data (using SQL) to add the escape characters the RichEdit needs so that it can be viewed as RichText. I would add some text to the RichEdit, then view this in EDB Manager .... that will show you how the escape characters are included in the data. I hope this helps. |
Wed, Jul 15 2015 5:43 AM | Permanent Link |
Hershcu Sorin | Thanks Adam
I set the "PlainText" to true and now I can see the old data but in Chinese. On the EDB Manager I can see the old data as Text and the new data, with the font edited, as code. I can't figure out from that how to UPDATE the data? "Adam Brett" wrote in message news:20066162-A20D-4BE8-9989-6232CC89C2F1@news.elevatesoft.com... Sorin The RichEdit component is complex. It shows data from a DB field, but it also uses complex escape characters to determine how attributes like bold or italic text are displayed. In Delphi the RichEdit Component has a property (I think called "PlainText" ??? or something similar) if you set this to "true" it may allow you to see the existing data. You may need to UPDATE existing data (using SQL) to add the escape characters the RichEdit needs so that it can be viewed as RichText. I would add some text to the RichEdit, then view this in EDB Manager .... that will show you how the escape characters are included in the data. I hope this helps. |
Wed, Jul 15 2015 6:49 AM | Permanent Link |
Adam Brett Orixa Systems | Sorin
>>I set the "PlainText" to true and now I can see the old data but in Chinese. Data may be presented wrongly if you are not setting ANSI / UNICODE correctly in your programme. >>On the EDB Manager I can see the old data as Text and the new data, with the >>font edited, as code. Good. I guess that the old data looks like: some text here And the new data might look like: {para}some text here{/para} >>I can't figure out from that how to UPDATE the data? Using the example above, you must write SQL in the following form: UPDATE <table> SET <textcolumn-name> = '{para}'+<textcolumn-name>+'{/para}' in other words write an UPDATE which adds in the escape characters used by the RichEdit. You would replace <table> with the name of your table, and <textcolumn-name> with the name of the column (or field) you are trying to update. I hope this is useful. |
Wed, Jul 15 2015 6:51 AM | Permanent Link |
Adam Brett Orixa Systems | If you post an example of the new data entered via the RichEdit, it would be possible for me to draft SQL to do the update for you.
|
Wed, Jul 15 2015 8:06 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Sorin
If you can use the TDBRichEdit with PlainText set true then you don't need the formatting capabilities (or at least you won't get any) so what editing capabilities are you looking for? There may be a better way. Roy Lambert |
Wed, Jul 15 2015 2:51 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sorin,
<< I alter a field type from VarChar to CLOB. On the application UI I change the component, attached to that field, from TDBMemo to TDBRichEdit because I need the edit options of this component. Why I can't see the old text value of this field on the TDBRichEdit component. On the EDB manager I can see the old value. If I add new text to the TDBRichEdit it's appear ok. >> What version of Delphi are you using, and are you using an ANSI or Unicode EDB database ? You've most likely got an issue with how the characters are being interpreted, especially if you're seeing junk with the plain-text view. Thanks, Tim Young Elevate Software www.elevatesoft.com |
Thu, Jul 16 2015 2:20 AM | Permanent Link |
Hershcu Sorin | Thanks all
I'm using Delphi XE5 with ANSI database. I use mostly hebrew characters. The edit capabilities I need are bold, italic and underline. I'll try latter Adam suggestion to UPDATE the data. Thanks Sorin "Tim Young [Elevate Software]" wrote in message news:1ECA4C40-5A95-4B86-ACD2-ADB9BD513B47@news.elevatesoft.com... Sorin, << I alter a field type from VarChar to CLOB. On the application UI I change the component, attached to that field, from TDBMemo to TDBRichEdit because I need the edit options of this component. Why I can't see the old text value of this field on the TDBRichEdit component. On the EDB manager I can see the old value. If I add new text to the TDBRichEdit it's appear ok. >> What version of Delphi are you using, and are you using an ANSI or Unicode EDB database ? You've most likely got an issue with how the characters are being interpreted, especially if you're seeing junk with the plain-text view. Thanks, Tim Young Elevate Software www.elevatesoft.com |
Fri, Jul 17 2015 3:50 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sorin,
<< I'm using Delphi XE5 with ANSI database. I use mostly hebrew characters. >> Is the system locale also Hebrew, or is English ? Tim Young Elevate Software www.elevatesoft.com |
Sat, Jul 18 2015 4:11 AM | Permanent Link |
Hershcu Sorin | English
"Tim Young [Elevate Software]" wrote in message news:43AA9464-1EEF-42C3-838C-51DD944D3FA1@news.elevatesoft.com... Sorin, << I'm using Delphi XE5 with ANSI database. I use mostly hebrew characters. >> Is the system locale also Hebrew, or is English ? Tim Young Elevate Software www.elevatesoft.com |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |