When the following code is executed an exception occurs.
public FileUpload(Guid guiFileUploadId)
{
Data.HelperClasses.DbUtils.CommandTimeOut = 600;
m_guiFileUploadId = guiFileUploadId;
FileUploadEntity = new FileUploadEntity(m_guiFileUploadId);
LoadFromDataSource();
}
Message: Exception of type 'System.OutOfMemoryException' was thrown.
Source: System.Data
Stacktrace: at System.Data.SqlTypes.SqlBinary.get_Value()
at System.Data.SqlClient.SqlBuffer.get_ByteArray()
at System.Data.SqlClient.SqlBuffer.get_Value()
at System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetValues(Object[] values)
at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.FetchOneRow(IDataReader dataSource, IEntityFields rowDestination, IFieldPersistenceInfo[] fieldPersistenceInfos)
at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.ExecuteSingleRowRetrievalQuery(IRetrievalQuery queryToExecute, ITransaction containingTransaction, IEntityFields fieldsToFill, IFieldPersistenceInfo[] fieldPersistenceInfos)
at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.PerformFetchEntityAction(IEntity entityToFetch, ITransaction containingTransaction, IPredicateExpression selectFilter, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields)
at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.FetchExisting(IEntity entityToFetch, ITransaction containingTransaction, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields)
at Data.EntityClasses.FileUploadEntityBase.Fetch(Guid fileUploadId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields)
at Data.EntityClasses.FileUploadEntityBase.InitClassFetch(Guid fileUploadId, IValidator validator, IPrefetchPath prefetchPathToUse)
at Data.EntityClasses.FileUploadEntity..ctor(Guid fileUploadId)
LLBLGen Pro version: 2.6 final released on September 26th 2008
Template group: Selfservicing.TwoClasses2005
.Net Version: 2.0
Database type / version: Sql server 2005 9.0.3054
The exception only occurs when the entity contains a very larger blob. If the blob becomes large then 250mb the exceptions occurs. Otherwise everything works fine.
P.S. A couple of months ago when everything was tested it was possible to use blob's up to 2gb. Since then the only thing that has changed are the windows updates.