ChangeConflictException LinqConnect 4.2.272

ChangeConflictException LinqConnect 4.2.272

Postby charlesboy » Sun 23 Jun 2013 15:07

still got error ChangeConflictException ROW NOT FOUND OR CHANGED (LinqConnect 4.2.272)
database mysql 5, provider dotconnect mysql

when i update the record with the same value for field DateTime....
please help... :(
charlesboy
 
Posts: 6
Joined: Sun 23 Jun 2013 14:59

Re: ChangeConflictException LinqConnect 4.2.272

Postby MariiaI » Tue 25 Jun 2013 09:03

We couldn't reproduce this issue with the latest build of LinqConnect 4.2.272.
This error is most likely related to incorrect comparison of fields with datetime type and differences in the MySQL settings and current regional settings on your computer. So, to help you to resolve this issue, we need the following additional information: the regional settings on your system and the regional and date format settings that are used on the server, the exact version of the MySQL server.

Also, we are sending you a test project to the e-mail address you have provided in your forum profile. Please check that the letter is not blocked by your mail filter. Please make changes to it so that the issue could be reproduced and send it back to us or send us your project.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: ChangeConflictException LinqConnect 4.2.272

Postby charlesboy » Wed 26 Jun 2013 02:23

Ok i will try to create this issue with sample project....
for my temporary solution is change connection string parameter with "Found Rows=True", the issue is gone...
charlesboy
 
Posts: 6
Joined: Sun 23 Jun 2013 14:59

Re: ChangeConflictException LinqConnect 4.2.272

Postby MariiaI » Wed 26 Jun 2013 06:11

Glad to see that this solution works for you.
We are looking forward to your reply with a sample project for reproducing the issue.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: ChangeConflictException LinqConnect 4.2.272

Postby AKRRKA » Thu 27 Jun 2013 13:03

I also faced the the same exact problem.
If it is possible to make an example of you send.

PS: But before such a problem does not seem to be it seems.
AKRRKA
 
Posts: 194
Joined: Thu 26 Jan 2012 15:07
Location: Russia

Re: ChangeConflictException LinqConnect 4.2.272

Postby MariiaI » Mon 01 Jul 2013 05:24

AKRRKA wrote:I also faced the the same exact problem.
If it is possible to make an example of you send.
PS: But before such a problem does not seem to be it seems.

We still couldn't reproduce this issue with the latest build of LinqConnect 4.2.272.
Please specify the following additional information: the regional settings on your system and the regional and date format settings that are used on the server, the exact version of the MySQL server.

Also, we are sending you a test project to the e-mail address you have provided in your forum profile. Please check that the letter is not blocked by your mail filter. Please make changes to it so that the issue could be reproduced and send it back to us or send us your project.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: ChangeConflictException LinqConnect 4.2.272

Postby AKRRKA » Mon 01 Jul 2013 13:44

Project with this problem reproduce: http://rghost.ru/47142414
It can be seen with MySQL and with SQLite.
AKRRKA
 
Posts: 194
Joined: Thu 26 Jan 2012 15:07
Location: Russia

Re: ChangeConflictException LinqConnect 4.2.272

Postby MariiaI » Mon 01 Jul 2013 15:24

Thank you for the sample project. Unfortunately, the issue is not reproducible with it. The sample is running without any errors, performing inserts and updates to the database correctly (both with MySQL and SQLite).
Thus, please specify the additional information that we have mentioned above and specify the stack trace of the error, so that we are able to investigate it in more details and find a solution for you.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: ChangeConflictException LinqConnect 4.2.272

Postby AKRRKA » Tue 02 Jul 2013 12:13

I recorded a video demonstration.
On it you can see everything.
If you need more information, tell me what I can offer.
Видео_2013-07-02_160834.wmv (7.6 МБ)
http://rghost.ru/47163411
AKRRKA
 
Posts: 194
Joined: Thu 26 Jan 2012 15:07
Location: Russia

Re: ChangeConflictException LinqConnect 4.2.272

Postby MariiaI » Thu 04 Jul 2013 10:44

Thank you for the video demonstration. Since we are not able to reproduce the problem on our environment, the issue is most likely in the configuration.
Please specify the following details:
- the regional settings on your system and the regional and date format settings that are used on the server;
- the exact version of the MySQL server;
- the scripts for creating database tables, that are used in the sample;

As for the SQLite, dates are stored in the database as strings and comparison of dates is performed as string comparison.
Strings may be different for the same date, because the date in SQLite may be stored with different accuracy (with milliseconds, etc.) and when comparing it with the date, that we pass from .NET, strings for this date can differ(e.g., date of 13/06/2012 may have representation in .NET as 13.06.2012 00:00:00.0000000, and in SQLite it can be represented as 13/06/2012 00:00:00.00).
However, we are considering adding the possibility to generate code with the conversion to the SQLite datetime type. For proper date comparison you could try using the explicit datetime type conversion and run queries via the DataContext.ExecuteQuery() method.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: ChangeConflictException LinqConnect 4.2.272

Postby AKRRKA » Thu 04 Jul 2013 15:24

1) MySQL and SQLite databases are generated from the model using the Entity Developer (no need script, you can just generated).
2) I have a very large project (in the model about 70 objects) working with different types of databases, all the work of abstraction using LinqConnect (and for that he bought), making branches for different database in the code is very bad.
3) The regional settings in my Windows 8 x64 Proffesional Rus + Ubuntu 12.04 + all MySQL 5.5.31 papametrs in the archives by link: http://rghost.ru/47210268
AKRRKA
 
Posts: 194
Joined: Thu 26 Jan 2012 15:07
Location: Russia

Re: ChangeConflictException LinqConnect 4.2.272

Postby MariiaI » Fri 05 Jul 2013 11:52

Thank you for the additional information. We are investigating this behaviour with MySQL. We will inform you about the results as soon as any are available.
As a temporary workaround, please set the Found Rows parameter to 'true' in the connection string in use (open Database Explorer->Edit Connection Properties-> Advanced) and save the changes (this solution helped autor of this topic to avoid the error).

Also, we would be grateful if you:
- send us the generated SQL queries (e.g., get them via LinqMonitor);
- try performing this scenario when column OrderDate in the Orders table is of DATE type, not DATETIME;
- try performing this scenario via Devart.Data.MySql.MySqlConnection and Devart.Data.MySql.MySqlCommand.html.

As for the error with SQLite, we have re-viewed the video and the error you are getting is about missing main.Orders table. Please check that the main.Orders table exists in your database.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: ChangeConflictException LinqConnect 4.2.272

Postby AKRRKA » Tue 09 Jul 2013 16:42

Unfortunately the base is removed.
Tried to re-create and reproduce the problem, and no longer see the errors.
Very strange.
Sorry that I can not help you.
AKRRKA
 
Posts: 194
Joined: Thu 26 Jan 2012 15:07
Location: Russia

Re: ChangeConflictException LinqConnect 4.2.272

Postby MariiaI » Wed 10 Jul 2013 09:48

We would be grateful if you let us know in case this issue will be reproduced again.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17


Return to LinqConnect (LINQ to SQL support)