Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 10 of 14 total |
EDB and TRichView. |
Wed, Nov 19 2014 4:11 PM | Permanent Link |
Steve Gill | Does anyone have experience with using TRichView components with EDB?
If I store the contents of a TRichViewEdit control as RTF (Rich Text Format) or RVF (Rich View Format) in a CLOB field with a UNI collation, the text appears as what looks like Chinese or Japanese characters when viewed in EDB Manager. Is this normal? Also, when I do a text search of this field programmatically using SQL, it doesn't find the text I'm searching for (there is a text index for the field). This is not too much of a problem because I also store the text as plain text in another field so I can search that field instead. = Steve |
Wed, Nov 19 2014 4:36 PM | Permanent Link |
Walter Matte Tactical Business Corporation | Yes this is expected - TRichview has their own formatting codes embedded - so you have done the right thing if you want to do a text search by putting text into a seperate column in the db.
If would be the same if you were to store a Word doc in the clob. Walter |
Wed, Nov 19 2014 6:32 PM | Permanent Link |
Steve Gill | << Yes this is expected - TRichview has their own formatting codes embedded - so you have done the right thing if you want to do a text search by putting text into a seperate column in the db.
If would be the same if you were to store a Word doc in the clob. >> Ok, thanks Walter. It threw me a bit because when I stored RTF in a BLOB field in DBISAM you could actually read the text amongst the RTF codes using DBSys. = Steve |
Thu, Nov 20 2014 3:55 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Steve
As Walter said RichView uses its own custom format internally. I use WPTools and it allows you a choice of default IO format there may be something in RichView. Why not as the author - I've forgotton his name - he was very helpful when I was looking at the alternatives. As far as SQL searching goes with any sort of formatted wp document you're better off creating a full text index. This give the same advantage of removing the control codes that creating a separate column would do but give MUCH faster searching for words. Naturally it doesn't do so well for phrases but a combination of CONTAINS and LIKE or POS see below) should work. Finally a point of warning. Tim has a wonderfully complete implementation of LIKE. It works extremely well for LIKE '%....' and '....%' but '%..%' on even medium sized CLOBS can be slow because of the sliding window needed to handle constructs such as '%this is a big?? search* than you would like%'. Since my needs are simple I switched to using POS which being simple like me is faster. Roy Lambert |
Thu, Nov 20 2014 4:12 AM | Permanent Link |
Matthew Jones | Steve Gill wrote:
> If I store the contents of a TRichViewEdit control as RTF (Rich Text > Format) or RVF (Rich View Format) in a CLOB field with a UNI > collation, the text appears as what looks like Chinese or Japanese > characters when viewed in EDB Manager. Is this normal? To me, that sounds like it is Ansi text stored in a Unicode field. That's why you are getting the unusual characters. RTF is all plain text normally (Unicode characters are encoded as \U1341 or something IIRC). I'd either use a binary BLOB (not character blob) or make the text Unicode string before storing. I may be wrong though - I'm fairly new to ElevateDB. -- Matthew Jones |
Thu, Nov 20 2014 7:54 PM | Permanent Link |
Barry | >Steve Gill wrote:
I'd either use a binary BLOB (not character blob) or make the text Unicode string before storing. < I would agree with Steve and store the TRichText in a Blob field in case it has embedded binary like an image or special formatting characters. Barry |
Fri, Nov 21 2014 12:47 AM | Permanent Link |
Steve Gill | Hi Roy,
<< As far as SQL searching goes with any sort of formatted wp document you're better off creating a full text index. This give the same advantage of removing the control codes that creating a separate column would do but give MUCH faster searching for words. Naturally it doesn't do so well for phrases but a combination of CONTAINS and LIKE or POS see below) should work. >> Yes, I'm already using a text index and am using CONTAINS in the searches. = Steve |
Fri, Nov 21 2014 12:54 AM | Permanent Link |
Steve Gill | Hi Matthew,
< To me, that sounds like it is Ansi text stored in a Unicode field. That's why you are getting the unusual characters. RTF is all plain text normally (Unicode characters are encoded as \U1341 or something IIRC). I'd either use a binary BLOB (not character blob) or make the text Unicode string before storing. >> TRichViewEdit can save as either RVF or RTF, and in either binary or text format. I have tried saving as both RVF and RTF in text format with the Unicode property set. I first wanted to find out if it was a limitation of EDB Manager before contacting the TRichView guys. I'll see what they have to say. Thanks. = Steve |
Fri, Nov 21 2014 3:15 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Steve
><< As far as SQL searching goes with any sort of formatted wp document you're better off creating a full text index. This give the same advantage of removing the control codes that creating a separate column would do but give MUCH faster searching for words. Naturally it doesn't do so well for phrases but a combination of CONTAINS and LIKE or POS see below) should work. >> > >Yes, I'm already using a text index and am using CONTAINS in the searches. Then is there a reason for "because I also store the text as plain text in another field"? Just curious Roy Lambert |
Fri, Nov 21 2014 5:49 AM | Permanent Link |
Matthew Jones | My suggestion applies only to a "plain text" RTF document, not to a
binary format of course. The binary wouldn't be searchable in EDB either. -- Matthew Jones |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Sunday, May 5, 2024 at 10:18 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |