Error on InsertAllOnSubmit()

Error on InsertAllOnSubmit()

Postby 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
...
Samircj
 
Posts: 6
Joined: Mon 06 May 2013 12:57

Re: Error on InsertAllOnSubmit()

Postby 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.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Error on InsertAllOnSubmit()

Postby 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
Samircj
 
Posts: 6
Joined: Mon 06 May 2013 12:57

Re: Error on InsertAllOnSubmit()

Postby 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/?InsertOnSubmit.html
http://www.devart.com/linqconnect/docs/?Devart.Data.Linq~Devart.Data.Linq.ITable~InsertAllOnSubmit.html

As for the modifying existing data, please refer here:
http://www.devart.com/linqconnect/docs/?ModifyingData.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.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Error on InsertAllOnSubmit()

Postby 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.
Samircj
 
Posts: 6
Joined: Mon 06 May 2013 12:57

Re: Error on InsertAllOnSubmit()

Postby MariiaI » Mon 10 Jun 2013 06:53

We are looking forward to your reply with a sample project.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17


Return to LinqConnect (LINQ to SQL support)