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!

ERROR CREATING OLE OBJECT 1

Status
Not open for further replies.

softlink

Programmer
May 29, 2003
5
US
FoxProW 2.6 application on a WINDOWS 95 Laptop.
A table with a General Field is appended with a *.bmp image
file using APPEND GENERAL fieldname FROM filename.bmp.
The application has worked fine for a long time until recently. It generates "ERROR CREATING OLE OBJECT" at the
statement.
 
This brings back memories! The following is part of a presentation I made at our local user group back in '96.

"In Windows 95 the 'Paint' program is MSPAINT.EXE, and has a ProgID of PAINT.PICTURE. After borrowing and adapting a TIP from FoxPro Advisor Magazine (June 1996) by Rick Strahl which sets some platform specific flags,
my "cross-platform" code now reads:
Code:
DO CASE
CASE _WIN31
   APPEND GENERAL tmp.PHOTO FROM my.pcx ;
     CLASS PBRUSH
CASE _WIN95
   APPEND GENERAL tmp.PHOTO FROM my.pcx ;
     CLASS PAINT.PICTURE
CASE _WINNT
   APPEND GENERAL tmp.PHOTO FROM my.pcx ;
     CLASS PBRUSH
ENDCASE
This is the first 'major' coding change that I've had to make to run FPW applications under Windows 95 - let's hope that there aren't too many other surprises waiting. Note: While I was explicitly developing this under FPW, all the above information should apply to VFP also."

The bottomline here is that General fields were a bad idea then and they still are - especially if you are using multiple OS's. Things were very simple before '95 - everyone was using Win 3.x!

Note: I've previously posted an updated version of Rick Strahl's code in this forum - just do a search for it if you need it!

Rick
 
to: rgbean
thanks very much for your reply.
it works.

softlink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top