Discussion:
OleDbQuestion
(too old to reply)
John Prado
2007-09-11 04:31:34 UTC
Permalink
I'm trying to get binary data using the VFP OleDbDriver from a dbf
table (foxpro 9), an image to be honest.

The big problem is the type of the field where this data is stored.

It's a long varchar field (do not ask me why).

When I try to use GetBytes to read the binary data I get a
InvalidCastException.

When I get the string it always return me only a few bytes (I'm
thinking that this bytes are the JPEG header).

There are any workaround on this? Even in the old way (ADODB, DBC)?
Fred Taylor
2007-09-11 06:20:44 UTC
Permalink
What is "GetBytes"?
--
Fred
Microsoft Visual FoxPro MVP
Post by John Prado
I'm trying to get binary data using the VFP OleDbDriver from a dbf
table (foxpro 9), an image to be honest.
The big problem is the type of the field where this data is stored.
It's a long varchar field (do not ask me why).
When I try to use GetBytes to read the binary data I get a
InvalidCastException.
When I get the string it always return me only a few bytes (I'm
thinking that this bytes are the JPEG header).
There are any workaround on this? Even in the old way (ADODB, DBC)?
Anders Altberg
2007-09-11 12:15:08 UTC
Permalink
Is this image in a column of the datatype General?
What's your programming environment?

-Anders
Post by John Prado
I'm trying to get binary data using the VFP OleDbDriver from a dbf
table (foxpro 9), an image to be honest.
The big problem is the type of the field where this data is stored.
It's a long varchar field (do not ask me why).
When I try to use GetBytes to read the binary data I get a
InvalidCastException.
When I get the string it always return me only a few bytes (I'm
thinking that this bytes are the JPEG header).
There are any workaround on this? Even in the old way (ADODB, DBC)?
Loading...