Loading chart from blob field

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
C.H. Luke
Newbie
Newbie
Posts: 5
Joined: Tue Sep 06, 2005 4:00 am

Loading chart from blob field

Post by C.H. Luke » Fri Sep 09, 2005 8:47 pm

I have a Delphi 7 utility that creates thousands of charts and loads them into a database. This "loader" utility utilizes TDBChart to make the chart, then I save to a file of type ".Tee" (Native) The .tee file is then loaded into a BLOB field in an Interbase database (Interbase: Just like Oracle only better). I now am building a "reader" utility that will display the charts that were built and stored previously. My question is this:

What is the best way to display the stored .tee charts?

1) TBlobField.SaveToFile(xxx.tee), then somehow load the .tee file into the TDBChart? (How do I do this?)

2) TBlobField.SaveToStream() then somehow load the TDBChart via a stream? (How do I do this?)

I need actual code snippets.

Thanks for any help you can provide.

C.H. Luke
Newbie
Newbie
Posts: 5
Joined: Tue Sep 06, 2005 4:00 am

Post by C.H. Luke » Fri Sep 09, 2005 10:05 pm

I have figured out the syntax for loading a chart from a blob field by using a TMemoryStream and LoadChartFromStream(). However, I keep getting the message: "Wrong *.tee file format".

A TDBChart was used to create the chart, then I saved to a .tee file using SaveChartToFile(), then I loaded the resultant file into a Blob field.

In the "reader" utility, I simply load the TDBChart from a stream that was "SavedTo" by the blob field.

What am I doing wrong?

-- sorry for posting in the wrong forum.

C.H. Luke
Newbie
Newbie
Posts: 5
Joined: Tue Sep 06, 2005 4:00 am

Post by C.H. Luke » Fri Sep 09, 2005 10:32 pm

Solved it. I just need to set Stream1.Position := 0 before reading from it. Sorry to bug you guys and gals.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Sep 12, 2005 8:53 am

Hi C.H. Luke,

I'm glad to hear you could solve your problem. However, we would appreciate that whenever you have any other TeeChart issue you posted it to the TeeChart VCL forums as this forum is for TeeTree VCL inquiries.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply