Solved

How I can store .html into FIREBIRD

Posted on 2004-04-26
11
502 Views
Last Modified: 2010-04-05
People
 I  need to  save HTML in database (FIREBIRD 1.5). But i'll like to save this pictures of type  BLOB.
I use Delphi7 + FireBird + components of Interbase Pallete.
Someone know how i can do it! What components to use ?

Thanks..

--Elielson
 
0
Comment
Question by:emaia
  • 6
  • 4
11 Comments
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 10920801

   use TADOBlobStream class
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 10920955
use
  BLOB SUB_TYPE 0 SEGMENT SIZE 80
this field type is for pictures: .bmp, .jpg ....
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 10921015
i guess you can use Jedi VCL components, especially TJvRichEditToHtml, but not sure because didn't use it or similar. It is placed on Jv Internet palette.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:emaia
ID: 10921083
Someone will can send code like exemple?

Thanks
0
 
LVL 12

Accepted Solution

by:
esoftbg earned 115 total points
ID: 10921186
by the way I sent to you a full working example in
http://experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20947052.html
about Extract DML in Firebird1.5
Without reaction since 04/08/2004 ????
0
 

Author Comment

by:emaia
ID: 10921588
Emil  
Sorry,  
I forgot of to answer your last message About DML Extract.  
What happened is that I needed only metada and I used the IBExpert tool.  
Thanks, you have been helping me a lot.  
I will like to use your code for backup in the future, this will be last part in my project and you will be receive your deserved points .  
I hope that you understands.  
 
I would like that you will receive the points in this question. My last points.  
Your code that you sent that  store ".jpg" works perfectly.  
And if you can help me with the problem to Insert HTML in DataBase.  
I will be thankful.  
Thanks, Emil.  
 
--Elielson
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 10921694
--Elielson,
I'll try to help you about the problem to Insert HTML in FireBird DataBase. I hope I'll do it successful, because I didn't do it  before... I guess it will spend some time....
emil
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 10946356
Sorry about my mistake above the FireBird field type:
>use
>  BLOB SUB_TYPE 0 SEGMENT SIZE 80
>this field type is for pictures: .bmp, .jpg ....
HTML file is a text file, so it is better to be stored into a:
  BLOB SUB_TYPE TEXT SEGMENT SIZE 80 CHARACTER SET WIN1252

About Delphi syntax:
You can use TIBSQL component if want to update an existing record (For insert a new record the way is similar):
var
  SL:     TStringList;
begin
  SL := TStringList.Create;
  try
    SL.LoadFromFile('C:\WEBSITES\MYSITE\index.html');
    ibSQL.SQL.Text := 'UPDATE ITEMS SET INFO=:PINFO WHERE ID=:PID';
    ibSQL.ParamByName('PID').AsString := IBTABLE_Items.FiledByName('ID').AsString;
    ibSQL.ParamByName('PINFO').AsString := SL.Text;
    ibSQL.ExecQuery;
  finally
    SL.Free;
  end;
end;

This is not tested. I hope it will work well....
0
 

Author Comment

by:emaia
ID: 10953493
Emil,  
the code that you sent me works correctly.  
 
By the way, how I can show the html in the form or application. I want to restore the data from database and show in the form.  
What component I can use.  
 
Thanks one more time...  
 
--Elielson

0
 
LVL 12

Expert Comment

by:esoftbg
ID: 10957531
I guess that for development of a web browser to display a .html, may be you can use TWebBrowser component from "Internet" palette of Delphi. I did not make a Web browser.
I have Jedi VCL components, there is a palette "Jv Internet" with 14 components. You may try them....
emil
0
 

Author Comment

by:emaia
ID: 10967715
Emil,
I tried the TWebBrowser, but only work when I put the URL like
  WebBrowser.Navigate.('c:\Data\teste.html').

I will try the Jedi Componetes.

Thanks..

Elielson
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

791 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