Page 1 of 1

Error on InsertAllOnSubmit()

Posted: Wed 05 Jun 2013 14:10
by Samircj

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
...

Re: Error on InsertAllOnSubmit()

Posted: Thu 06 Jun 2013 09:38
by MariiaI
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.

Re: Error on InsertAllOnSubmit()

Posted: Thu 06 Jun 2013 12:13
by Samircj
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

Re: Error on InsertAllOnSubmit()

Posted: Fri 07 Jun 2013 09:44
by MariiaI
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.

Re: Error on InsertAllOnSubmit()

Posted: Fri 07 Jun 2013 13:44
by Samircj
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.

Re: Error on InsertAllOnSubmit()

Posted: Mon 10 Jun 2013 06:53
by MariiaI
We are looking forward to your reply with a sample project.