V4RB and Valentina and Rich Text Format

Barry G. Sumpter barrysum at bigpond.net.au
Tue Aug 11 08:18:39 CDT 2009


Man!  That took forever to nut out!


    Dim vTBL as vTable
    vTBL = vDB.Table("MyTable")
    
    vTBL.SetBlank
    
    vTBL.Field("TextPage").value = efStyledText.Styledtext.text
    vTBL.VarBinaryField("TextStyle").value = efStyledText.TextStyleData
    
    Dim NewRecID As integer
    NewRecID = vTBL.AddRecord()
    
    
    vtbl.flush
    vdb.flush

-----

  vCurs = vDB.SqlSelect( "SELECT TextPage, TextStyle FROM MyTable WHERE
RecID = 1" )
  
  if vCurs.RecordCount < 1 then Exit sub
  
  dim myText as string
  myText = vCurs.Field("TextPage ").value
  '
  dim myStyle as string
  myStyle = vCurs.VarBinaryField("TextStyle ").value
  '
  '
  efStyledText.setTextAndStyle(myText, myStyle)

-----

Man what a waste of time.....




-----Original Message-----
From: valentina-beta-bounces+barrysum=bigpond.net.au at lists.macserve.net
[mailto:valentina-beta-bounces+barrysum=bigpond.net.au at lists.macserve.net]
On Behalf Of Ruslan Zasukhin
Sent: Tuesday, 11 August 2009 4:34 PM
To: valentina-beta at lists.macserve.net; valentina at lists.macserve.net
Subject: Re: V4RB and Valentina and Rich Text Format

On 8/11/09 2:20 AM, "Barry G. Sumpter" <barrysum at bigpond.net.au> wrote:

Hi Barry,

I believe in the V4RB API Reference there is mention of this near to
VarBinary field.

Also you can find similar question on this list archive.

In short:

You split RTF on 2 parts TEXT + STYLE

TEXT go to a string field           String/VarChar/TEXT
STYLE info go to binary field      FixedString/VarBinary/BLOB


> Can anyone tell me how to save a rich text format field (styledText)
> To a Valentina database
> AND retrieve the field data with all Rich Text Formatting applied?

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]


_______________________________________________
Valentina-beta mailing list
Valentina-beta at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina-beta



More information about the Valentina-beta mailing list