Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to copy a *.bmp file from a floppy disc to a blob field Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
28-Aug-02
Category
Files Operation
Language
Delphi 2.x
Views
113
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas

How to copy a *.bmp file from a floppy disc to a blob field

Answer:
1   
2   procedure TForm1.Button1Click(Sender: TObject);
3   var
4     tb: TBlobstream;
5     tf: TFileStream;
6   begin
7     table1.edit; {load from disk file and save in table}
8     tf := TFileStream.create('splash.bmp', fmOpenRead);
9     tb := TBlobstream.create(Table1PictureData, bmReadWrite);
10    tb.CopyFrom(tf, 0);
11    tf.free;
12    tb.free;
13    table1.post;
14  end;
15  
16  procedure TForm1.FormCreate(Sender: TObject);
17  var
18    tb: TBlobstream;
19  begin
20    table1.active := true;
21    if not (Table1.EOF) then
22    begin
23      Table1.first; {load from table and display}
24      tb := TBlobstream.create(Table1PictureData, bmRead);
25      Image1.Picture.Bitmap.LoadFromStream(tb);
26      tb.free;
27    end;
28  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC