[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.8

Reading/Writing BLOB fields

Asked by alternativeit in Interbase / Firebird Database

Tags: blob

Hi all,

I've been struggling with this problem for some time, and thought the IB gurus here may be able to assist.

Basically, I have a table in an Interbase 6 database that contains two columns; table structure is below.

CREATE TABLE INBOXBLOB
(
  INBLOBKEY      VARCHAR(16) NOT NULL,
  INBLOB      BLOB SUB_TYPE 0 SEGMENT SIZE 80,
CONSTRAINT INBOXBLOBPK PRIMARY KEY (INBLOBKEY)
);

The INBLOBKEY column contains file names; these are referenced back to another table in the DB for identification purposes. The INBLOB column contains a TIFF image, which is programatically accessed from the application that uses this DB and displayed within the GUI.

What I want to do is write a script or app that will loop over all of the rows in the table and extract the data from the INBLOB column out to a file within the filesystem (with the filename from the INBLOBKEY column).

I'll then use a batch graphics conversion app to compress these TIFF's (I don't need any help with this step).

Once all the images have been a) dumped from the table and b) compressed, I then want to run a process of looping over the list of TIFF's within the filesystem, and inserting the image back into a new (clean) DB table, with the same structure as the original table.

I've got a solid programming history, and am comfortable with the filesystem-related aspects of this process. I also have a good experience with T-SQL, but what  I DON'T have much experience with is Interbase, specifically BLOB fields.

What I'm looking for is a code example of how to acheive the steps of:

a) exporting the blob fields from the DB to the filesystem
b) inserting the files from the filesystem back into a BLOB field within a table

As for the language, I'd be happy with VB, VBScript, JScript, PHP, ASP, or Perl... or <other>, if that's what you know.  I just want to make this happen :)  (I'm currently dealing with databases of 10-20GB in size, which are full of uncompressed TIFF's; If I can get the above process working, I'm looking at reducing those database sizes by around 90%!!!)

Cheers all...
alternativeit
[+][-]08/12/05 02:23 PM, ID: 14664724Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Interbase / Firebird Database
Tags: blob
Sign Up Now!
Solution Provided By: NickUpson
Participating Experts: 2
Solution Grade: B
 
[+][-]08/15/05 01:48 AM, ID: 14673114Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/16/05 02:27 AM, ID: 14681108Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08/16/05 05:28 PM, ID: 14688092Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92