LinqConnect Professional Version 4.1.151 - Problem when change Database

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
AKRRKA
Posts: 198
Joined: Thu 26 Jan 2012 15:07
Location: Russia
Contact:

LinqConnect Professional Version 4.1.151 - Problem when change Database

Post by AKRRKA » Thu 17 Jan 2013 08:10

LinqConnect Professional Version 4.1.151 - Problem when change Database

1) Create model;
2) Connect to MySQL;
3) Generate Database from Model;
4) Save all;
5) Cretae copy context.xml for mysql database;
6) Change connection to Oracle;
7) Have problem with DbType into Context.lqml, model don`t valid.

Attention: Sometimes after changing database types are changed automatically, and sometimes do not change at all. It is not clear what the reason for this behavior. What do I need to do to validate always passed correctly after changing the database?

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

Re: LinqConnect Professional Version 4.1.151 - Problem when change Database

Post by MariiaI » Thu 17 Jan 2013 10:37

After changing your connection from MySQL to Oracle, your model still holds storage part and model mapping for the previous database - MySQL - and, because some data types in Oracle and MySQL are different, the model is not valid.

To make the model valid, you can do the following: perform "Generate Database Script From Model" or "Update Database From Model" (if the database does not exist yet, or need to be updated) with the 'Regenerate Storage' check-box selected. In this case all server data types in the model will be updated to the correct types.

AKRRKA
Posts: 198
Joined: Thu 26 Jan 2012 15:07
Location: Russia
Contact:

Re: LinqConnect Professional Version 4.1.151 - Problem when change Database

Post by AKRRKA » Thu 17 Jan 2013 11:41

MariiaI wrote:After changing your connection from MySQL to Oracle, your model still holds storage part and model mapping for the previous database - MySQL - and, because some data types in Oracle and MySQL are different, the model is not valid.
I understand. I about it saying.
MariiaI wrote:To make the model valid, you can do the following: perform "Generate Database Script From Model" or "Update Database From Model" (if the database does not exist yet, or need to be updated) with the 'Regenerate Storage' check-box selected. In this case all server data types in the model will be updated to the correct types.
Thanks! After "Generate Database Script From Model" with the 'Regenerate Storage' check-box selected the problem was resolved, and data type update to the correct.

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

Re: LinqConnect Professional Version 4.1.151 - Problem when change Database

Post by MariiaI » Thu 17 Jan 2013 11:58

Glad to see the issue was resolved. If you have any further questions, feel free to contact us.

Post Reply