Migrating to 5.11 - DynamicQueryEngine and CreateSelectDQ

Posts   
 
    
Marco R
User
Posts: 2
Joined: 11-Feb-2013
# Posted on: 03-Jun-2024 19:35:50   

I downloaded the trial version of 5.11 to evaluate the work required to upgrade an old 4.2 project and ran into a problem that I haven't been able to figure out. It's SQL Server using the SelfServicing model. We have a method that takes PredicateExpression, RelationCollection, GroupByCollection, etc and then modifies the resulting command text (INSERT INTO.. SELECT FROM instead of just a select) before executing with SqlCommand.

The old code looks like this:

Dim dqe As New DynamicQueryEngine Dim retQ As IRetrievalQuery = dqe.CreateSelectDQ(selectFields.GetAsEntityFieldCoreArray, selectPersists.ToArray, trans.ConnectionToUse, filter, 0, Nothing, relations, False, groupBy) Dim insertSQL As String = RewriteForInsertQuery(retQ, jobId)

I think I see how the call to CreateSelectDQ would have to change as the signature is different and now takes QueryParameters, but the first line won't compile because it can't resolve DynamicQueryEngine which used to be found in SD.LLBLGen.Pro.DQE.SqlServer. Is there a different way of doing this now or am I missing something obvious?

We're only doing this in one spot so I could rewrite it to not use LLBLGen for this but I'd rather not since the logic for building the relations and predicates is old, complex, and working (LOL)

Marco R
User
Posts: 2
Joined: 11-Feb-2013
# Posted on: 03-Jun-2024 21:09:58   

Nevermind! My reference to SD.LLBLGen.Pro.DQE.SqlServer was screwed up.