×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

CLOB / BLOB

CLOB / BLOB

CLOB / BLOB

(OP)
Hi all,

I'm still new with this sql thingy. I'm just wondering what're the differences between BLOB and CLOB. And how to declare them and use them properly. Any help will be appreciated. Thanks.

Regards,

Dimaz Pramudya

RE: CLOB / BLOB

CLOB = Character Large OBject
BLOB = Binary Large OBjects
I saw CLOB on Oracle engine, BLOB on Firebird/Interbase, for me they are the same meaning.
What a BLOB does ? I quote from Firebird documentation:

A Blob is used to store very large data objects of indeterminate and variable size, such as bitmapped graphics images, vector drawings, sound files, video segments, chapter or book-length documents, or any other kind of multimedia information. Because a Blob can hold different kinds of
information, it requires special processing for reading and writing.

RE: CLOB / BLOB

(OP)
Hi rtmpxr,

Thanks for your explanation. Do you have any example about this CLOB / BLOB thingy? I just wanna know how to declare it and use it. Thanks.

Regards,

Dimaz Pramudya

RE: CLOB / BLOB

Create a table with a blob field (see the docs of the sql engine how to do it). Then create an interface with the database to load the blob. For example you want to create a database with mp3's.

Load the blob into the table (Delphi language):
procedure TForm1.Button1Click(Sender: TObject);
begin
OpenDialog1.Execute; //search for the mp3 file
if IBDataSet1.State = dsBrowse then IBDataSet1.Edit;
IBDataSet1MP3_FILE.LoadFromFile(OpenDialog1.FileName);
end;

PLay the file from database using MediaPlayer component (Delphi language). Suppose you are on the 4 record in database:
procedure TForm1.Button3Click(Sender: TObject);
begin
MediaPlayer1.Close;
IBDataSet1MP3_FILE.SaveToFile('e:\temp.mp3');
MediaPlayer1.FileName := 'e:\temp.mp3';
MediaPlayer1.Open;
end;

Here IBDataSet1MP3_FILE is the blob field of the IBDataSet1 database component.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources