I moved some projects from a FoxPro database with extended fields (including Image) to a Visual FoxPro format.

I was using the following function to detect whether the field was a Blob or an image field:

 Table.AdsGetMemoDataType(FieldName) = mdtImage

This no longer seems to work with the VFP format. Is there any way I can attach a byte or a tag to a Blob field so that I could easily test whether the binary field contains a general binary or a image field?

BTW, is there a way I could do this for other field types without using a dictionary? I could create in my application my own field types for specific applications (such as latitude and longitude) or something else.

asked 02 May '13, 10:10

Normand's gravatar image

Normand
61778
accept rate: 0%


The AdsGetMemoDataType method does not really apply to VFP tables. Older style (pre-VFP) DBF tables did not have a native BLOB type, which is why the logic was added to store BLOBs in memo fields. And as a result the "memo data type" API was added to determine what was actually stored in the memo.

Because VFP tables have support for true binary data, the AdsGetMemoDataType function is not really applicable. I believe it will always return mdtBinary for a binary field. If you have a field that holds an image for some records and non-images for other records in the same table, then it might be necessary to add another field indicating the data type. Alternatively, maybe create two binary (BLOB) fields - one for images and one for non-image data.

link

answered 02 May '13, 16:12

Mark%20Wilkins's gravatar image

Mark Wilkins
7.2k226133
accept rate: 26%

Your answer to the original question.
If responding to a request for additional information, please edit the question or use the comment functionality.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×24

Asked: 02 May '13, 10:10

Seen: 2,212 times

Last updated: 02 May '13, 16:12

Advantage Developer Zone Contact Us Privacy Policy Copyright Info


Powered by Advantage Database Server and OSQA
Disclaimer: Opinions expressed here are those of the poster and do not necessarily reflect the views of the company.