Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE error code 0x800401c0 OLESTREAM Get Method Failed

Status
Not open for further replies.

kate

Programmer
Nov 19, 2001
51
US
hello,
I'm getting this error when trying to populate a picture from a general field in a table to an olepic object on a form. It works for some of the records in the table, but not others and I keep getting this error message. Has anyone seen this error before or know where I could get an explanation for it?

thanks.
 
I have not seen this error specifically, but most OLE errors with General fields are typically related to how the data got into the General field. You see, the General field holds the data plus OLE information about the automation object it is related to.

So if you have content related to a specific automation object and this object is not registered on every machine accessing the data, you can get errors when accessing the information.

_RAS
Shedding Some Light (blog)
VFP MVP
 
OK, what i have is a program that creates badges for employees.

First we take the picture and save as a bitmap. A record is then created with the employee's number in one field and the picture into the general field. This works fine.

However, when we go to look that photo up, there is an olepic object on this form that we use to display what is in the general field in the record that was being looked up. This is where we get the error.

So the same machine is saving and looking up the picture in the general field. I must also mention that the program and the file are running off of the same server.
 
Since you're saving the image already, don't bother putting in the general field. That causes memo file bloat anyway, and in your case isn't necessary. You could just reference the image file name in a character field.
I wrote an employee badge app myself. I store the image on the server with a refernce to the filename in a field. The picture is displayed on the form using a VFP image control on the form, rather than an ole control.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
this is the code used to append the photo into the record.
append general empphoto.photo from c:\play\content\pictures\snaps\image.bmp

the graphic file is always of the same type, a bitmap.

The only properties aside from the defaults are stretch property is set to isometric and sizable is set to false.
 
I also wanted to say thanks to Rick and Dave for the help. I may try what you've suggested Dave.
 
Dave, I like your suggestion. However, how do I go about exporting the pictures from the general field and save them as the employee number that is referenced with it? Is there a way to do this that anyone knows of?
 
Therein lies the rub. It's not an easy task.
There are some posts on doing that, but I haven't been able to get the examples I've tried to work. So I won't recommend any. If someone else has done it successfully, I'll let them expound on it.

The best way I've found to do it is using the clipboard. Copying and pasting the individual pictures. Of course, if there are a lot it may take some time, but it may be worth it.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
oh well, i knew it couldn't be all roses. it never is. anyways, thanks for the advice. however, i would still like to find out what is causing that error because it doesn't not make any sense to me.
 
well, i've figured out the problem that way arising had to do with the size of the file we were trying to insert into the general field. We were trying to save the pictures as bitmaps which were too large to save across the network to a general field for some reason. Don't ask me why because we have a T1 and it is fast.

However, when I changed the pictures to .jpg's, it was fine and I was not getting this error anymore.
 
Kate,

By changing the graphics to JPGs you are likely changing the OLE server the files are associated with when they are stored in the General field. This might have more to do with the resolution of the problem than the file size. The JPGs will save on the storage space which is a huge bonus for network traffic.



_RAS
Shedding Some Light (blog)
VFP MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top