Conflict between different versions ORM Library

Posts   
 
    
Luca75
User
Posts: 37
Joined: 10-Feb-2012
# Posted on: 11-Mar-2016 20:09:50   

Hello how can I use the DQE and ORM library of different LLBLGen versions 2.6 and 3.5 in the same project without conflicts . I have a job did it all with 2.6 ( Oracle and MsSql2015 ) now I Sql2012 We add the 2.5 do not get me error when trying to retrieve the tables , I made a new project from the 3.5 that works correctly but now I have a project you must use both DQE and ORM ( V2.5 and 2.6 ) library visual studio I diche that fails to resolve dependencies . How can I fix?

Errore 1 L'assembly 'XXXDAL, Version=1.0.5914.36371, Culture=neutral, PublicKeyToken=null' utilizza 'SD.LLBLGen.Pro.ORMSupportClasses.NET20, Version=3.5.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27' la cui versione è successiva a quella dell'assembly 'SD.LLBLGen.Pro.ORMSupportClasses.NET20, Version=2.6.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27' a cui viene fatto riferimento c:\Users XXXDAL

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 12-Mar-2016 15:57:49   

Why do you need both projects and references in the same project?

David Elizondo | LLBLGen Support Team
Luca75
User
Posts: 37
Joined: 10-Feb-2012
# Posted on: 12-Mar-2016 16:14:51   

Hello, yes in the same project. Alternatively longer exists a way to work with LLBLGen 2.6 of SQL2014Express ? Thanks

Luca75
User
Posts: 37
Joined: 10-Feb-2012
# Posted on: 14-Mar-2016 12:33:09   

Error on 2.6 vs SQLExpress2014 Code: ExecuteReader: la proprietà CommandText non è stata inizializzata -----[Core exception]-------------------- in System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) in System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) in System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) in System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) in System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) in System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) in System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) in System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) in System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) in SD.LLBLGen.Pro.DBDrivers.SqlServer.SqlServerCatalogRetriever.RetrieveSchemas(String connectionString, IDBCatalog catalogToRetrieve, SchemaFetchFlags fetchFlags) in SD.LLBLGen.Pro.DBDrivers.SqlServer.SqlServerDBDriver.PopulateSelectedCatalogs(Hashtable callBacks, Hashtable connectionElements, SchemaFetchFlags fetchFlags, Hashtable properties) in SD.LLBLGen.Pro.Gui.Forms.NewProjectWizard.CreateNewProject()

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 14-Mar-2016 16:49:40   

2 versions of ORMSupportClasses in the same project isn't supported, so you have to use one.

v2.6 on 2014 isn't supported (it was released in 2008!). You need to migrate your project to v3 at least. If that's impossible, you have to alter the sqlserver driver sourcecode yourself. You can obtain that sourcecode from the customer area ('My Account' on the website after you log in). It uses a couple of switch statements to determine which query to execute and the architecture of the v2.x driver doesn't anticipate on future versions, so in some occasions there's no case clause for the version of the database you're working with (2012 or higher).

Frans Bouma | Lead developer LLBLGen Pro
Luca75
User
Posts: 37
Joined: 10-Feb-2012
# Posted on: 14-Mar-2016 17:11:44   

Thanks a nice problem .. until I can get LLBL verison of regenerating the DAL but without rewriting any query ? Using the template SelServicing .. I have everything written with PredicateExpression clearly .. I can go from 2.6 to 5 without rewriting any query ? I with the syntax of the 2.6 I am fine , and no one will pay me to update it .. Thanks

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 15-Mar-2016 00:52:24   

Sorry but I don't understand your last message.

Luca75
User
Posts: 37
Joined: 10-Feb-2012
# Posted on: 15-Mar-2016 10:15:48   

Excuse my question is: If regeneration from with version 5 can I set the backward compatibility with the 2.6 so that all my query does not need to be rewritten. I use selfservicing 2 class scenario queries IpredicateExpression use. Thanks

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 15-Mar-2016 22:13:46   

You won't need to re-write your queries. But there are breaking changes and things to consider when migrating. These are listed in the documentation.

Luca75
User
Posts: 37
Joined: 10-Feb-2012
# Posted on: 16-Mar-2016 09:40:50   

Thanks , I did not know I believed that queries go as written in Linq . It ' a great thing congratulations! So you believe in the query like this can work in V5 ? I have to use a particular template ? Thank you

VUnionTypedView MyView = new VUnionTypedView();

IPredicateExpression MyFilter = new PredicateExpression();

SortExpression MySorter = new SortExpression(VUnionFields.FkId | SortOperator.Ascending);

MySorter.Add(VUnionFields.Data | SortOperator.Ascending);

MyFilter.Add(VUnionFields.Data == MyDay);
MyFilter.Add(VUnionFields.FkId == Id);
MyView.Fill(0, MySorter, true, MyFilter);

return MyView;
Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 16-Mar-2016 15:51:11   

Linq, queryspec as well as the LLBLGen low level queries as you mentioned, all works. The code you shared should work.