Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Convert OLE BLOB data type back to original BLOB

Posted on 2004-04-12
5
Medium Priority
?
1,803 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
ID: 10806408
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 200 total points
ID: 10809070
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
ID: 10809719
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
ID: 10811394
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
ID: 10814353
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
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 NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

927 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