Search found 3 matches

by Keenan
Tue 17 Sep 2013 14:09
Forum: dotConnect for PostgreSQL
Topic: Error when inserting large binary files using EF4
Replies: 17
Views: 5210

Re: Error when inserting large binary files using EF4

Thank you for the quick response. Do you have a time estimate for the typical turnaround to fix an issue? I'm trying to plan out a sprint for a project and I need to account for this.

Thanks again,
Keenan
by Keenan
Mon 16 Sep 2013 17:59
Forum: dotConnect for PostgreSQL
Topic: Error when inserting large binary files using EF4
Replies: 17
Views: 5210

Re: Error when inserting large binary files using EF4

The upload issue was resolved by increasing the max_allowed_packet to 50MB in mysql. Although when attempting to retrieve any file over 10MB I get the following error:

System.ArgumentException
Source: Devart.Data.MySql
Message: Cannot retrieve huge data in FetchAll mode

StackTrace:
at Devart.Data.MySql.bl.b(Boolean A_0)
at Devart.Data.MySql.bl.n()
at Devart.Data.MySql.bu.m()
at Devart.Data.MySql.af.b(ab[] A_0, Int32 A_1)
at Devart.Data.MySql.af.a(Byte[] A_0, Int32 A_1, Boolean A_2)
at Devart.Data.MySql.i.b()
at Devart.Data.MySql.i.v()
at Devart.Data.MySql.MySqlCommand.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords)
at Devart.Common.DbCommandBase.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at Devart.Data.MySql.Entity.x.a(CommandBehavior A_0)
at Devart.Common.Entity.eb.b(CommandBehavior A_0)
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)


Here's the EF4 code that throws the error:

using (SalesModelDB db = new SalesModelDB())
{
fileData = db.DataDictionaries
.Where(d => d.Id == fileId)
.Select(f => f.FileData)
.FirstOrDefault();
}

Is there a way to increase the fetch limit or switch the mode from fetchall to something else to allow me to get these larger binary files?

Thank you,
Keenan
by Keenan
Wed 28 Aug 2013 18:50
Forum: dotConnect for PostgreSQL
Topic: Error when inserting large binary files using EF4
Replies: 17
Views: 5210

Re: Error when inserting large binary files using EF4

I encounter a similar problem inserting large binary files into a mysql database through EF4(using devart's dotConnect for MySQL).
I get the exception and message below when inserting mp4 video files, approx. 4mb in size.

System.InvalidOperationException
Message: "Connection must be opened."

StackTrace:
at Devart.Common.Utils.CheckConnectionOpen(IDbConnection connection)
at Devart.Data.MySql.MySqlConnection.Rollback()
at Devart.Data.MySql.MySqlTransaction.Dispose(Boolean disposing)
at System.Data.Common.DbTransaction.Dispose()
at System.Data.EntityClient.EntityTransaction.Dispose(Boolean disposing)
at System.Data.Common.DbTransaction.Dispose()
at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
at System.Data.Entity.Internal.InternalContext.SaveChanges()
at System.Data.Entity.Internal.LazyInternalContext.SaveChanges()
at System.Data.Entity.DbContext.SaveChanges()

I've found that if I only import the binary objects for pdfs of similar size(~2.5mb) that everything works well.

Is this still an open problem for dotConnect for MySQL?

Thank you,
Keenan