Solved

Convert OLE BLOB data type back to original BLOB

Posted on 2004-04-12
5
1,760 Views
Last Modified: 2013-12-26
Hi all,

  I have a problem here.  My senior was using a program to update some images (JPEG) file into Oracle database table as BLOB data type.  According to him, he was using OLE which cause a problem in reading it now.  He said that is because when we use OLE , the OLE will add extra information/codes in front and at the back of the BLOB.  That's why when we try to convert it back to original BLOB, problem occured.

  My question is, what is the easiest way to convert BLOB data in my table back to original BLOB data by removing that piece of codes from the BLOB.

  Please provide me the source code.  Thanks first for your help.

Regards,
Yong Yih
0
Comment
Question by:yongyih
  • 3
5 Comments
 
LVL 2

Author Comment

by:yongyih
Comment Utility
For your information, He is using PowerBuilder 7 to do it and I am using PowerBuilder 8 now.

I just want to write a program to loop through all the records in that table and convert all the BLOB data.

thanks.
0
 
LVL 15

Accepted Solution

by:
namasi_navaretnam earned 50 total points
Comment Utility
Yong,

Have you read this doc yet ?

You can use selectblob, updateblob functions.

All info you need in outlined in thid doc
http://www.sybase.com/detail?id=44008

regards-
0
 
LVL 2

Author Comment

by:yongyih
Comment Utility
hi namasi navaretname

  I know how to use selectblob and update blob.  I need to know the function that I can use to remove the extra bits in OLE BLOB for those photos that have been updated to database as OLE BLOB.

  Do you know how many byte of data will be add to original BLOB when we use OLE BLOB?

  Any idea?

regards,
Yong Yih
0
 
LVL 14

Expert Comment

by:sandeep_patel
Comment Utility
hi,
as i know it is not adding any extra bytes...b'coz in my application i can store data from ole blob to database and again can read that data from database and assign to ole blob....i m not facing any problem....

as u said u r facing problem in selecting the data and assigned back to the database is it right ? if it's happening than can u describe what's the problem or error u r facing while selecting or assigning ?

if u don't know than...to show the image again no need to select from database and assign to OLE...simply u can create the datawindow and select the database blob column and directly display the contents....

just clearify your exact requirements....

regards,
sandeep
0
 
LVL 2

Author Comment

by:yongyih
Comment Utility
Hi,

  I also not sure how does my senior program update those photos to database.  According to him, extra bit appear does exist in blob data stored in database.

  Create a datawindow to display the blob data is not possible I think because we are using different framework which is created by my company.

  If you update the data using OLE BLOB, can other application access those information?

Regards,
Yong Yih.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now