StrataFrame Forum

Working with VFP Memo (Binary) fields

http://forum.strataframe.net/Topic30047.aspx

By William Fields - 6/11/2011

Hello,

This is not a SF question, but I suppose more of an ADO/SQL Server question.

We use VFP Memo (Binary) fields to store the content of an ActiveX Rich Text Format control and we're in the process of developing a conversion routine that will move our VFP data to SQL Server.

For whatever reason, when we query the data through ADO or through SQL Server as a Linked Server, the field value looks like some strange hex string. Here's an example:

0x7B5C727466315C616E73695C616E7369637067313235325C64656666305C6465666C616E67313033337B5C666F6E7474626C7B5C66305C666E696C5C6663686172736574302054696D6573204E657720526F6D616E3B7D7D0D0A7B5C636F6C6F7274626C203B5C726564305C677265656E305C626C7565303B7D0D0A7B5C2A5C67656E657261746F72204D7366746564697420352E34312E32312E323530393B7D5C766965776B696E64345C7563315C706172645C6366315C66305C667332342041530D0A7D0D0A

But, if I look at the same field in VFP, this is what's stored:

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}}
{\colortbl ;\red0\green0\blue0;}
{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\cf1\f0\fs24 AS
}


Which to me is just a string. I'm not an RTF expert, so I'm not sure why the Memo (Binary) data type was chosen (the original developer is no longer around). I know that RTF controls can embed images and other binary conent (documents and such), but isn't that all just stored as a big string?

I have two questions.

  1. How can I query the content of the Memo (Binary) field in SQL Server when the VFP table is set up as a linked server? The goal is to be able to use these fields in a SF app, but through a SQL Server Linked Server.
  2. When we migrate the data to SQL Server in the future, what data type should we use?
Thanks.