ASP.Net - Access 2003 - Large BLOBs

R

Rich S

Working on C#/ASP.Net application in which we are storing secure, private
PDFs, Excel Spreadsheets, Videos, and Images in an Access 2003 database. We
have not yet upgraded the database to SQL Server as it is still in the
development and testing stages.

Unable to utilize administrative webforms that insert BLOBS in excess of
4MB. No problems with any of the documents that are 2MB or less. Objects
range up to 110MB.

Using the following code to read file:

Stream ms = filSource.PostedFile.InputStream;

BinaryReader br = new BinaryReader(ms);

byte[] byteArray = br.ReadBytes((int)filSource.PostedFile.ContentLength);

br.Close();

Object is inserted into the database as a parameter,
OleDbType.LongVarBinary.

Docs indicate that the max field size is 1GB so should work. Any ideas?
 
M

Mary Chipman

Are you trying to read these blobs into an Access OLE field with the
idea that you are eventually going to migrate them to a SQL Server
table? If so, this is a really bad idea for any database, but
especially for Access. It has a long tradition of choking on large
blobs, becoming easily corrupted in the process. Even for SQL Server,
which is a more robust platform by far, recommended best practice is
to store the blobs on the file system and simply record the location
in a table.

--Mary
 
C

Cor Ligthert

Mary,

In my opinion is your message true, however I have another idea for
thumbnails.

Just to make your message not as black and white as it looks like now.

Cor

Mary Chipman said:
Are you trying to read these blobs into an Access OLE field with the
idea that you are eventually going to migrate them to a SQL Server
table? If so, this is a really bad idea for any database, but
especially for Access. It has a long tradition of choking on large
blobs, becoming easily corrupted in the process. Even for SQL Server,
which is a more robust platform by far, recommended best practice is
to store the blobs on the file system and simply record the location
in a table.

--Mary

Working on C#/ASP.Net application in which we are storing secure, private
PDFs, Excel Spreadsheets, Videos, and Images in an Access 2003 database.
We
have not yet upgraded the database to SQL Server as it is still in the
development and testing stages.

Unable to utilize administrative webforms that insert BLOBS in excess of
4MB. No problems with any of the documents that are 2MB or less. Objects
range up to 110MB.

Using the following code to read file:

Stream ms = filSource.PostedFile.InputStream;

BinaryReader br = new BinaryReader(ms);

byte[] byteArray = br.ReadBytes((int)filSource.PostedFile.ContentLength);

br.Close();

Object is inserted into the database as a parameter,
OleDbType.LongVarBinary.

Docs indicate that the max field size is 1GB so should work. Any ideas?
 
M

Mary Chipman

???

Mary,

In my opinion is your message true, however I have another idea for
thumbnails.

Just to make your message not as black and white as it looks like now.

Cor

Mary Chipman said:
Are you trying to read these blobs into an Access OLE field with the
idea that you are eventually going to migrate them to a SQL Server
table? If so, this is a really bad idea for any database, but
especially for Access. It has a long tradition of choking on large
blobs, becoming easily corrupted in the process. Even for SQL Server,
which is a more robust platform by far, recommended best practice is
to store the blobs on the file system and simply record the location
in a table.

--Mary

Working on C#/ASP.Net application in which we are storing secure, private
PDFs, Excel Spreadsheets, Videos, and Images in an Access 2003 database.
We
have not yet upgraded the database to SQL Server as it is still in the
development and testing stages.

Unable to utilize administrative webforms that insert BLOBS in excess of
4MB. No problems with any of the documents that are 2MB or less. Objects
range up to 110MB.

Using the following code to read file:

Stream ms = filSource.PostedFile.InputStream;

BinaryReader br = new BinaryReader(ms);

byte[] byteArray = br.ReadBytes((int)filSource.PostedFile.ContentLength);

br.Close();

Object is inserted into the database as a parameter,
OleDbType.LongVarBinary.

Docs indicate that the max field size is 1GB so should work. Any ideas?
 
C

Cor Ligthert

Mary,

In my opinion is a blob field with a thumbnail field and a field with the
path to the actual image the nicest way to do it. And not only as you write
holding the path to an image in a database.

Cor

Mary Chipman said:
???

Mary,

In my opinion is your message true, however I have another idea for
thumbnails.

Just to make your message not as black and white as it looks like now.

Cor

Mary Chipman said:
Are you trying to read these blobs into an Access OLE field with the
idea that you are eventually going to migrate them to a SQL Server
table? If so, this is a really bad idea for any database, but
especially for Access. It has a long tradition of choking on large
blobs, becoming easily corrupted in the process. Even for SQL Server,
which is a more robust platform by far, recommended best practice is
to store the blobs on the file system and simply record the location
in a table.

--Mary

Working on C#/ASP.Net application in which we are storing secure,
private
PDFs, Excel Spreadsheets, Videos, and Images in an Access 2003 database.
We
have not yet upgraded the database to SQL Server as it is still in the
development and testing stages.

Unable to utilize administrative webforms that insert BLOBS in excess of
4MB. No problems with any of the documents that are 2MB or less.
Objects
range up to 110MB.

Using the following code to read file:

Stream ms = filSource.PostedFile.InputStream;

BinaryReader br = new BinaryReader(ms);

byte[] byteArray =
br.ReadBytes((int)filSource.PostedFile.ContentLength);

br.Close();

Object is inserted into the database as a parameter,
OleDbType.LongVarBinary.

Docs indicate that the max field size is 1GB so should work. Any ideas?
 
M

Mary Chipman

OIC -- yes, a nice way to do it if it's just images. But of less
utility with large spreadsheets and pdf's, as is the case here.

--Mary

Mary,

In my opinion is a blob field with a thumbnail field and a field with the
path to the actual image the nicest way to do it. And not only as you write
holding the path to an image in a database.

Cor

Mary Chipman said:
???

Mary,

In my opinion is your message true, however I have another idea for
thumbnails.

Just to make your message not as black and white as it looks like now.

Cor

"Mary Chipman" <[email protected]>

Are you trying to read these blobs into an Access OLE field with the
idea that you are eventually going to migrate them to a SQL Server
table? If so, this is a really bad idea for any database, but
especially for Access. It has a long tradition of choking on large
blobs, becoming easily corrupted in the process. Even for SQL Server,
which is a more robust platform by far, recommended best practice is
to store the blobs on the file system and simply record the location
in a table.

--Mary

Working on C#/ASP.Net application in which we are storing secure,
private
PDFs, Excel Spreadsheets, Videos, and Images in an Access 2003 database.
We
have not yet upgraded the database to SQL Server as it is still in the
development and testing stages.

Unable to utilize administrative webforms that insert BLOBS in excess of
4MB. No problems with any of the documents that are 2MB or less.
Objects
range up to 110MB.

Using the following code to read file:

Stream ms = filSource.PostedFile.InputStream;

BinaryReader br = new BinaryReader(ms);

byte[] byteArray =
br.ReadBytes((int)filSource.PostedFile.ContentLength);

br.Close();

Object is inserted into the database as a parameter,
OleDbType.LongVarBinary.

Docs indicate that the max field size is 1GB so should work. Any ideas?
 

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

Top