Problem with write binary data to OLE field in Access

KingMax lialie at gmail.com
Fri Mar 28 12:58:34 EDT 2008


On 3月27日, 下午7时22分, Tim Golden <m... at timgolden.me.uk> wrote:
> lialie wrote:
>
> [... snip slightly confused indication that reading back a
> binary item using GetChunk appears to double its length ...]
>
> Well I don't know why this should be happening, but I do at
> least have a few suggestions:
>
> 1) Try using ADODB.Stream instead of GetChunk etc.
>
> 2) Try using the adodbapi dbapi-compliant wrapper
>
> 3) Try using ODBC (via PyODBC, CeODBC etc.)
>
> I've no idea if any of these will do any better but at
> least it gives you some possibilities :)
>
> TJG

Thanks!
I try using ADODB.Stream to implement it. But the situation is the
same.
At last, I try this, and it seems to work.
1) Save the image to the dist.
2) using ADODB.Stream.LoadFromFile
3) Save it into access
and then first step done.

when using it, I try this:
1) ADODB.Stream.Write(Record.Fields("xxx").Value)
2) ADODB.Stream.SaveToFile("test.jpg")
3) using wxImage to load it in.

a little stupid :(



More information about the Python-list mailing list