Board index » delphi » How to view and save jpeg graghic from dataset

How to view and save jpeg graghic from dataset

HI,
    Anyone can tell  me  which way is the best to view jpeg graghic from
dataset /Tquery .I use delpphi4/Msslq7.
    Anyhelp is welcome!
    dgste...@163.net
    Steven Chow
 

Re:How to view and save jpeg graghic from dataset


Hallo,

you must save a blobstream (TBlobStream) in a file (a temp-file) and then
you can load the file
in a TImage-object. But don't forget to set the Image-Object, that can it
handle
jpeg images.

for example

    uses
        ..., jpeg, .... {!!!}

        ..... {many lines of code} ....

        ....Image1.Picture.RegisterFileFormat('jpg','',TJPEGImage); {now can
a TImage show jpegs}

If you want to save a jpeg you must do the same. You use a TBlobStream and
you can save a file into
a TTable.

Ingo Buchholz

I've current a other problem perhaps you can help me. How can I restrict the
numbers of rows that effect a
query?
I Have a query with more then 10.000 rows in the resultset. I want show the
user only 1000 rows in a DBGrid.
How Can I do it.

Quote
dgsteven wrote:
> HI,
>     Anyone can tell  me  which way is the best to view jpeg graghic from
> dataset /Tquery .I use delpphi4/Msslq7.
>     Anyhelp is welcome!
>     dgste...@163.net
>     Steven Chow

Re:How to view and save jpeg graghic from dataset


Hi Steven,

give me an email to ch...@hampton-pidgeon.freeserve.co.uk and i will email
you
a full working program that loads from jpg file , saves to MSSQL7 and also
retrieves
from MSSQL7. Below sounds ok but this will show you how.

I think I will post the program to the Code Central if anyone can tell me
how to
do it. That way everyone can see an effective and quick way of doing it.

regards
Chris Hampton-Pidgeon

Quote
Ingo Buchholz wrote in message <3955236D.6FEDF...@takwa.de>...
>Hallo,

>you must save a blobstream (TBlobStream) in a file (a temp-file) and then
>you can load the file
>in a TImage-object. But don't forget to set the Image-Object, that can it
>handle
>jpeg images.

>for example

>    uses
>        ..., jpeg, .... {!!!}

>        ..... {many lines of code} ....

>        ....Image1.Picture.RegisterFileFormat('jpg','',TJPEGImage); {now
can
>a TImage show jpegs}

>If you want to save a jpeg you must do the same. You use a TBlobStream and
>you can save a file into
>a TTable.

>Ingo Buchholz

>I've current a other problem perhaps you can help me. How can I restrict
the
>numbers of rows that effect a
>query?
>I Have a query with more then 10.000 rows in the resultset. I want show the
>user only 1000 rows in a DBGrid.
>How Can I do it.

>dgsteven wrote:

>> HI,
>>     Anyone can tell  me  which way is the best to view jpeg graghic from
>> dataset /Tquery .I use delpphi4/Msslq7.
>>     Anyhelp is welcome!
>>     dgste...@163.net
>>     Steven Chow

Re:How to view and save jpeg graghic from dataset


Hi Chris,

If you don't mind that, would you give me a copy of the code also?

Quote
> Hi Steven,

> give me an email to ch...@hampton-pidgeon.freeserve.co.uk and i will email
> you
> a full working program that loads from jpg file , saves to MSSQL7 and also
> retrieves
> from MSSQL7. Below sounds ok but this will show you how.

> I think I will post the program to the Code Central if anyone can tell me
> how to
> do it. That way everyone can see an effective and quick way of doing it.

> regards
> Chris Hampton-Pidgeon

> Ingo Buchholz wrote in message <3955236D.6FEDF...@takwa.de>...
> >Hallo,

> >you must save a blobstream (TBlobStream) in a file (a temp-file) and then
> >you can load the file
> >in a TImage-object. But don't forget to set the Image-Object, that can it
> >handle
> >jpeg images.

> >for example

> >    uses
> >        ..., jpeg, .... {!!!}

> >        ..... {many lines of code} ....

> >        ....Image1.Picture.RegisterFileFormat('jpg','',TJPEGImage); {now
> can
> >a TImage show jpegs}

> >If you want to save a jpeg you must do the same. You use a TBlobStream and
> >you can save a file into
> >a TTable.

> >Ingo Buchholz

> >I've current a other problem perhaps you can help me. How can I restrict
> the
> >numbers of rows that effect a
> >query?
> >I Have a query with more then 10.000 rows in the resultset. I want show the
> >user only 1000 rows in a DBGrid.
> >How Can I do it.

> >dgsteven wrote:

> >> HI,
> >>     Anyone can tell  me  which way is the best to view jpeg graghic from
> >> dataset /Tquery .I use delpphi4/Msslq7.
> >>     Anyhelp is welcome!
> >>     dgste...@163.net
> >>     Steven Chow

--
Chan Chu Man.

Other Threads