Hi!
Well the problem figured out finally - read binary data using stream object as you already did, but write using the AppendChunk method as directed in the 'ADO Jump Start for VFP Developers' article (
http://msdn.microsoft.com/library/techart/adojump.htm):
For example, to read a file into bibnary field use following:
rs.Fields("logo").AppendChunk(FileToStr("MyFile.BMP"))
I'm wondered, neither MS articles work completely for VFP! Anyway, luckily there is a way to do this at all...
HTH.
>Dear Vlad,
>
>Thank you for your advice and the useful link. I can retrieve the image object from SQL server into VFP. I also look another link from that page (Q258038). That page told me how can I save the image into SQL server but it wrote in VB. I try to convert the syntax into VFP and run it. An error occurred and stopped at a statement "rs.Fields("logo").Value = mStream.read". It work fine in VB language. Could you help me to point out the problem? Thank you very much ....
>
>Best Regards,
>
>Justy Chow
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.