I'm porting a VFP 9 application to SQL Server. The VFP app has some tables with "general" fields in them. I get a byte array when query the field, and when I save it to disk, I can look inside and see it's a word document, or a Paint BMP, etc.
From reading around, I've found that the general field is a proprietary format and contains a thumbnail image of the preview of the document (amongst other things, I'm sure).
Can somebody point me to some code that would extract firstly the type of file, and then the actual file data that I can save as the original file. (Getting the preview image out would be nice too.)
Apparently back in the day, somebody wrote a program in foxpro called GENTOFIL.PRG which sounds like it converts general fields to a file. But, google doesn't help much when trying to find that!