Error on InsertAllOnSubmit()

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
Samircj
Posts: 6
Joined: Mon 06 May 2013 12:57

Error on InsertAllOnSubmit()

Post by Samircj » Wed 05 Jun 2013 14:10

Code: Select all

using(var contexto = VenezaEntities.Create())
{
   contexto.ARQUIVO_ATUALIZAR.InsertAllOnSubmit(listaArquivoSalvar);
   await contexto.SubmitChangesAsync();
}

Code: Select all

A first chance exception of type 'Devart.Data.Linq.LinqCommandExecutionException' occurred in mscorlib.dll
A first chance exception of type 'Devart.Data.Linq.LinqCommandExecutionException' occurred in mscorlib.dll
i'm using this correctly?

I create a list of the table i want for update.
then pass the list for the context
...

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Error on InsertAllOnSubmit()

Post by MariiaI » Thu 06 Jun 2013 09:38

We couldn't reproduce this issue on our environment. Please specify the following:
- the version of LinqConnect for Metro you are using;
- the definitions of the listaArquivoSalvar variable and the ARQUIVO_ATUALIZAR entity class;
- the full stack trace of the exception.

Also, please send us a small test project, with which this error could be reproduced, so that we are able to investigate it in more details.

Samircj
Posts: 6
Joined: Mon 06 May 2013 12:57

Re: Error on InsertAllOnSubmit()

Post by Samircj » Thu 06 Jun 2013 12:13

The Method InsertAllOnSubmit() can be used for Update rows?

With a foreach it took 3min to update 100 objects. :(

I need to improve performance on my solution.

Please Help

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Error on InsertAllOnSubmit()

Post by MariiaI » Fri 07 Jun 2013 09:44

The InsertAllOnSubmit method is used when newly created rows should be added to the DataContext in a pending insert state. The actual insertion into the database is performed when calling SubmitChanges.
Please refer here:
http://www.devart.com/linqconnect/docs/ ... ubmit.html
http://www.devart.com/linqconnect/docs/ ... ubmit.html

As for the modifying existing data, please refer here:
http://www.devart.com/linqconnect/docs/ ... gData.html

As for the exception you are getting and performance question, please send us a small test project, with which this error could be reproduced, so that we are able to investigate it in more details, and specify the following:
- the version of LinqConnect for Metro you are using;
- the definitions of the listaArquivoSalvar variable and the ARQUIVO_ATUALIZAR entity class;
- the full stack trace of the exception.

JIC: we have contacted you by the mail on 24.05.2013 14:25 with information regarding your question about performance in Metro style application. Please confirm whether you have received it or not.

Samircj
Posts: 6
Joined: Mon 06 May 2013 12:57

Re: Error on InsertAllOnSubmit()

Post by Samircj » Fri 07 Jun 2013 13:44

Yes i received your email.

And i tryed to implement the solutions you had sad.

I'll send u one small exemple. Thank you for while.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Error on InsertAllOnSubmit()

Post by MariiaI » Mon 10 Jun 2013 06:53

We are looking forward to your reply with a sample project.

Post Reply