?
Solved

How I can store .html into FIREBIRD

Posted on 2004-04-26
11
Medium Priority
?
512 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

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

Thanks
0
 
LVL 12

Accepted Solution

by:
esoftbg earned 460 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

771 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