Storing and Retreiving SQL2K BLOBS

  • Thread starter Thread starter David Beck
  • Start date Start date
D

David Beck

I have a need to store PDF, TIF and other files in TEXT fields on my
SQL2000 Server and them retreive them and restore them to the disk
(VB6). I created a table

CIP_DOCUMENT_ID int no 4 10 0 no (n/a)
(n/a) NULL
NAME varchar no 255 no no no
SQL_Latin1_General_CP1_CI_AS
BODY text no 16 no (n/a) (n/a)
SQL_Latin1_General_CP1_CI_AS

And wrote code to read the binary contents of a file into a varient. I
then stored the contents of the varient into the TEXT field (BODY). When
I reverse the process, the data is incorrect. Can someone show me a code
stub for doing this or point me in the right direction?

Dab
 
David,

In addidition to David, for storing and writting a Blob file to a SQL server
I have a lot of samples.

However all VBNet. (What is as well for the sample of David showed on MSDN)

For VB6 there are other newsgroups. All starting with
microsoft.public.vb

I think that beside of the Image answer from David you can get there easier
an answer on your question how to access that.

Just a little addition.

Cor
 
Cor,
Could you post your samples? I'd be interested in seeing them!
Regards,
David R. Jenkins
 
David,

This is my standard format for that for a windowform, when you need someting
like this for a webform or a webservice tell that than. (In the webservice
sample I have also the sample how to overcome the ole format and using a
thumbnail)

http://groups.google.com/[email protected]

In this sample I have tried as much as possible to avoid the memorystream
(although it is in this sample as well)

I hope this helps?

Cor
 
Thanks for posting the link! I am always interested in looking at the
way others write code. I find that it helps me improve my ways of
coding by seeing others work.

Thanks again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top