Storing Large "blobs"

Storing Large "blobs"

Post by Todd Spark » Tue, 31 Aug 1999 04:00:00



    Please forgive me for posting this message across groups, but I am
really not sure who out there can best help me come up with a solution.
    Okay, here is what we do now.  We scan multiple page documents in using
Microsoft Imaging and save those documents in an Access '97 table.  We use a
bound OLE field in order to store and update the files from the table.
    Presently this works okay, but we have an SQL server and want to move
all of this data to that server.  I have written a simple little function
(using ADO) which will allow me to write the files to the the SQL server
table in appropriately sized chunks.  Where I am having the problem is that
since I have to write the files in chunks I don't think that I can use a
bound field anymore, and I am having trouble updating the file (ie. adding
pages or removing pages).
    What I really need is some way to retrieve the file from the SQL table
and then load it into an unbound OLE field so that it can be viewed and
edited and then rewritten to the SQL table when the user is done with it.
If anyone out there has any suggestions or help for me a would be very
appreciative.
Thanks.

Todd Sparks

 
 
 

Storing Large "blobs"

Post by Larry Linso » Tue, 31 Aug 1999 04:00:00



 > We scan multiple page documents in using
 > Microsoft Imaging and save those documents in an Access '97 table.
 > We use a bound OLE field in order to store and update the files
 > from the table. Presently this works okay, but we have an SQL server
 > and want to move all of this data to that server.  I have written a
 > simple little function (using ADO) which will allow me to write the
 > files to the the SQL server table in appropriately sized chunks.
 > Where I am having the problem is that since I have to write the
 > files in chunks I don't think that I can use a bound field anymore,
 > and I am having trouble updating the file (ie. adding pages or
 > removing pages).
 > What I really need is some way to retrieve the file from the SQL
 > table and then load it into an unbound OLE field so that it can be
 > viewed and edited and then rewritten to the SQL table when the user
 > is done with it.
 > If anyone out there has any suggestions or help for me a would be
 > very appreciative.

In the Microsoft Access Knowledge Base, article Q103257, which I
obtained 3/26/1999 from the following web address:

  http://support.microsoft.com/support/kb/articles/q103/2/57.asp

describes using an OLE field as a BLOB. However, if you are using the
GetChunk and AppendChunk to retrieve from an OLE object in an OLE
field, you are getting wrapper and all, and I don't see why you would
have a problem using the SQL Server field as the Control Source for a
bound OLE field. If you use an unbound OLE field, you will need to
somehow remove the "wrapper" information from around the OLE object,
and I can't tell you how to do that -- you may have to bring them up,
double-click to have them processed by the associated
application, "save as" to put them back in their original form on disk,
and then reload them from there.

Now, if you have succumbed to the notion that you cannot LINK SQL
tables but must unbind your forms and use code to retrieve /
manipulate / display the information, I can only suggest that you visit
the FAQ site, http://www.mvps.com/access, and look at the article that
is (mis)titled "Displaying Photos in Access Forms" that deals with
approaches to storing images in Access databases. It isn't exactly what
you want to do, but may be helpful.

Best of luck with your application.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 
 
 

Storing Large "blobs"

Post by John Steel » Wed, 01 Sep 1999 04:00:00


Todd,
        Another approach is to store the pages separately.  Create a second
table which stores the document id, a page number, and the image of the
page.  To retrieve the pages, just link to this table.
        The problem is that blob data is usually stored in image fields.  Image
fields store the data in pure binary, not separated into pages.

John Steely
DaVinci TWG



>  > We scan multiple page documents in using
>  > Microsoft Imaging and save those documents in an Access '97 table.
>  > We use a bound OLE field in order to store and update the files
>  > from the table. Presently this works okay, but we have an SQL server
>  > and want to move all of this data to that server.  I have written a
>  > simple little function (using ADO) which will allow me to write the
>  > files to the the SQL server table in appropriately sized chunks.
>  > Where I am having the problem is that since I have to write the
>  > files in chunks I don't think that I can use a bound field anymore,
>  > and I am having trouble updating the file (ie. adding pages or
>  > removing pages).
>  > What I really need is some way to retrieve the file from the SQL
>  > table and then load it into an unbound OLE field so that it can be
>  > viewed and edited and then rewritten to the SQL table when the user
>  > is done with it.
>  > If anyone out there has any suggestions or help for me a would be
>  > very appreciative.

> In the Microsoft Access Knowledge Base, article Q103257, which I
> obtained 3/26/1999 from the following web address:

>   http://support.microsoft.com/support/kb/articles/q103/2/57.asp

> describes using an OLE field as a BLOB. However, if you are using the
> GetChunk and AppendChunk to retrieve from an OLE object in an OLE
> field, you are getting wrapper and all, and I don't see why you would
> have a problem using the SQL Server field as the Control Source for a
> bound OLE field. If you use an unbound OLE field, you will need to
> somehow remove the "wrapper" information from around the OLE object,
> and I can't tell you how to do that -- you may have to bring them up,
> double-click to have them processed by the associated
> application, "save as" to put them back in their original form on disk,
> and then reload them from there.

> Now, if you have succumbed to the notion that you cannot LINK SQL
> tables but must unbind your forms and use code to retrieve /
> manipulate / display the information, I can only suggest that you visit
> the FAQ site, http://www.mvps.com/access, and look at the article that
> is (mis)titled "Displaying Photos in Access Forms" that deals with
> approaches to storing images in Access databases. It isn't exactly what
> you want to do, but may be helpful.

> Best of luck with your application.

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

 
 
 

Storing Large "blobs"

Post by Mladen Tur » Wed, 01 Sep 1999 04:00:00


Well, you said that you wrote the function for inserting data into database
using chunks. The solution for your problem would be to revert that
operation. By that I mean that you simply read the desired document with
ReadChunk, and save it to some temporary file, and then after editing, all
you have to do is to update that document back into the database, and delete
it from disk.
This is common solution for nonbound OLE fields. Basically that is exactly
what the Office programs do, just look into the TEMP folder when you edit
some OLE field, and you'll se that the temps files are been created and
deleted.

Hope that helps,

--
Mladen Turk, GISDATA d.o.o
MCSE/GIS Specialist
Bastijanova 52a, 10000 Zagreb, Croatia

http://www.gisdata.com
http://www.gisdata.hr

 
 
 

1. Storing large numbers or "scientific notation"

Hi all.

I'm writing a lab application that stores numbers for things like cell
counts, which are always expressed in scientific notation.

What's the preferred method of storing such values?  Should I just create a
number field with, say, a scale of 20 digits, and just control the entry of
these numbers from the client app?

Thanks for your input.

-John

2. pros and cons

3. max of ("...","...","..")

4. oracle pricing

5. CRLF in "Text" Columns ( aka Blob )

6. Opposite of an SQL query.

7. dbengine exception "invalid BLOB lenght"

8. Memory Hog?

9. Urgent, "Blob has been modified", Help...

10. "Blob modified" error

11. "BLOB Not Found" - Delphi/Interbase

12. "BLOB has been modified"

13. BDE Error "BLOB has been modified"