Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How I can store .html into FIREBIRD

Posted on 2004-04-26
11
Medium Priority
?
516 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Screencast - Getting to Know the Pipeline
Suggested Courses

610 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