Board index » delphi » Saving MS Word files / Bmp files/ text / rich text files in SQL Server

Saving MS Word files / Bmp files/ text / rich text files in SQL Server

Hi

Can any one suggest me how to save following kind of file to SQL Server and
then retrieve them.

MS Word files / bmp fiiles (image files) / rich text file/ text file.

Thanks
Ary

 

Re:Saving MS Word files / Bmp files/ text / rich text files in SQL Server


One approach I have used is to first, on the client, use an TOleContainer.
Then you can easily stream the data to and from the dataset. Secondly, since
the makers of the products mentioned don't give much considataration to your
diskspace, I would advice to use some sort of compression (standard LZW or
similar) before putting them in the databasefield (and decompressing
naturally when fetching).

Hope this might put you in the right direction

Good luck

"Ary" <arus...@rediffmail.com> skrev i melding news:3bead3da_2@dnews...

Quote
> Hi

> Can any one suggest me how to save following kind of file to SQL Server
and
> then retrieve them.

> MS Word files / bmp fiiles (image files) / rich text file/ text file.

> Thanks
> Ary

Re:Saving MS Word files / Bmp files/ text / rich text files in SQL Server


Thanks Havard

But Can u please tell me how to use OleContainer to stream data to and from
dataset specially ADO Datasets.

Thanks
Ary

Quote
"Havard Ostgaard" <havard.ostga...@side.no> wrote in message

news:3bec1b54_1@dnews...
Quote
> One approach I have used is to first, on the client, use an TOleContainer.
> Then you can easily stream the data to and from the dataset. Secondly,
since
> the makers of the products mentioned don't give much considataration to
your
> diskspace, I would advice to use some sort of compression (standard LZW or
> similar) before putting them in the databasefield (and decompressing
> naturally when fetching).

> Hope this might put you in the right direction

> Good luck

> "Ary" <arus...@rediffmail.com> skrev i melding news:3bead3da_2@dnews...
> > Hi

> > Can any one suggest me how to save following kind of file to SQL Server
> and
> > then retrieve them.

> > MS Word files / bmp fiiles (image files) / rich text file/ text file.

> > Thanks
> > Ary

Re:Saving MS Word files / Bmp files/ text / rich text files in SQL Server


Ary,

It's VERY easy :

MyTable.FieldByName('MyBlobField').ReadFromFile('Testes.XLS');

[]

Walcir

"Ary" <arus...@rediffmail.com> escreveu na mensagem
news:3bec25b7$1_2@dnews...

Quote
> Thanks Havard

> But Can u please tell me how to use OleContainer to stream data to and
from
> dataset specially ADO Datasets.

> Thanks
> Ary

> "Havard Ostgaard" <havard.ostga...@side.no> wrote in message
> news:3bec1b54_1@dnews...
> > One approach I have used is to first, on the client, use an
TOleContainer.
> > Then you can easily stream the data to and from the dataset. Secondly,
> since
> > the makers of the products mentioned don't give much considataration to
> your
> > diskspace, I would advice to use some sort of compression (standard LZW
or
> > similar) before putting them in the databasefield (and decompressing
> > naturally when fetching).

> > Hope this might put you in the right direction

> > Good luck

> > "Ary" <arus...@rediffmail.com> skrev i melding news:3bead3da_2@dnews...
> > > Hi

> > > Can any one suggest me how to save following kind of file to SQL
Server
> > and
> > > then retrieve them.

> > > MS Word files / bmp fiiles (image files) / rich text file/ text file.

> > > Thanks
> > > Ary

Re:Saving MS Word files / Bmp files/ text / rich text files in SQL Server


Hi

Quote
> MyTable.FieldByName('MyBlobField').ReadFromFile('Testes.XLS');

I don't see any property  "ReadFromFile"
I am using Delphi 5

Thanks
Ary

Re:Saving MS Word files / Bmp files/ text / rich text files in SQL Server


Hi

Sorry , I mean any procedure/function with  name "ReadFromFile"

Thanks
Ary

Other Threads