In-line parameters not working

Posts   
 
    
Puser
User
Posts: 228
Joined: 20-Sep-2012
# Posted on: 11-Jan-2019 09:42:04   

Hi,

using ORM Profiler 2.0 with Jet Database (mdb) and LLBLGen 5.5.1 (adapter)

When I profile my application I can see the generated SQL in the SQL tab with the parameters. When I copy it to clipboard with the button and checkbox 'in-line parameters when copying to clipboard' unchecked I get:

UPDATE [sysUserProfileNumeric]
SET [Value] = @p1
WHERE  ([sysUserProfileNumeric].[ProfileID] = @p2
    AND [sysUserProfileNumeric].[UserID] = @p3) 

with the checkbox Checked, I get:

UPDATE [sysUserProfileNumeric]
SET [Value] = @p1
WHERE  ([sysUserProfileNumeric].[ProfileID] = @p2
    AND [sysUserProfileNumeric].[UserID] = @p3) 
43476 /* @p1 */

But I would have expected:

UPDATE [sysUserProfileNumeric]
SET [Value] = 43478
WHERE  ([sysUserProfileNumeric].[ProfileID] = 283
    AND [sysUserProfileNumeric].[UserID] =0) 

Parameters are in attachement.

For Orm Profiler 1.5 this works the same as 2.0. But from previous thread I now think there is something wrong. Maybe with combination of Jet DB

Attachments
Filename File size Added on Approval
2019-01-11 09_40_44-ORM Profiler v2.0 RTM (166 day(s) left in LLBLGen Pro Subscription).png 23,430 11-Jan-2019 09:43.45 Approved
Walaa avatar
Walaa
Support Team
Posts: 14975
Joined: 21-Aug-2005
# Posted on: 11-Jan-2019 10:43:46   

I tested it against SQL Server, and it's working fine as expected. We'll try to install test it against Access.

(Edit) Reproduced with MS Access (O365)

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39711
Joined: 17-Aug-2003
# Posted on: 11-Jan-2019 14:29:01   

It's a bug in the SQL parser we use. I'll make a fall back on the code we added ourselves for queries where the sql parser fails. that hopefully fixes it.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39711
Joined: 17-Aug-2003
# Posted on: 15-Jan-2019 11:03:42   

Fixed in next build (2.0.1).

Will post back here when it's live.

Frans Bouma | Lead developer LLBLGen Pro
Puser
User
Posts: 228
Joined: 20-Sep-2012
# Posted on: 15-Jan-2019 11:36:53   

Merci!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39711
Joined: 17-Aug-2003
# Posted on: 15-Jan-2019 14:39:34   

We've uploaded ormprofiler v2.0.1 to the site, simply download 'ormprofiler' from the my account -> downloads page, run the installer and it should be fixed.

Frans Bouma | Lead developer LLBLGen Pro
Puser
User
Posts: 228
Joined: 20-Sep-2012
# Posted on: 15-Jan-2019 15:25:33   

Thanks, it works.

although under an Access/Jet DB the query cannot be run for the remarks are not considered remarks in Jet. for example:

SELECT [RoyaltyContractRechtType].[BrutoAandeelPerc], [RoyaltyContractRechtType].[NettoAandeelPerc], [RoyaltyContractRechtType].[RoyaltyContractID] AS [RoyaltyContractId], [RoyaltyContractRechtType].[RoyaltyContractRechtTypeID] AS [RoyaltyContractRechtTypeId], [RoyaltyContractRechtType].[RoyaltyContractTypeRechtTypeID] AS [RoyaltyContractTypeRechtTypeId], [RoyaltyContractRechtType].[ToestemmingVereist] FROM [RoyaltyContractRechtType] WHERE ([RoyaltyContractRechtType].[RoyaltyContractID] IN (6163 /* @p1 /, 4373 / @p2 /, 6838 / @p3 /, 40116 / @p4 /, 8859 / @p5 /, 6251 / @p6 /, 8241 / @p7 /, 40352 / @p8 */))

All remarks like '/* @p1 */' have to be manually removed.

I'd like to see an option in where I can have these remarks removed also. Is that possible?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39711
Joined: 17-Aug-2003
# Posted on: 15-Jan-2019 16:48:29   

That's of course possible, it would also solve the problem of the other thread where inlining the parameters in the query before beautification crashes the sql parser (which is a 3rd party lib so no fixes there... )

Will do that now, just a sec.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39711
Joined: 17-Aug-2003
# Posted on: 15-Jan-2019 17:41:55   

Please redownload 2.0.1, it now has additional inlining options. They're remembered across queries in the same application tab (the vertical ones). The always inline option is now also present. This should fix your problem I think simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Puser
User
Posts: 228
Joined: 20-Sep-2012
# Posted on: 15-Jan-2019 17:51:10   

Ha Frans,

really nice these options!

results:

SELECT [RoyaltyContractExploitatieGroep].[AfrekenVolgorde], [RoyaltyContractExploitatieGroep].[OmschrijvingOpAfrekening], [RoyaltyContractExploitatieGroep].[RoyaltyContractExploitatieGroepID] AS [RoyaltyContractExploitatieGroepId], [RoyaltyContractExploitatieGroep].[RoyaltyContractID] AS [RoyaltyContractId], [RoyaltyContractExploitatieGroep].[RoyaltyExploitatieGroepID] AS [RoyaltyExploitatieGroepId], [RoyaltyContractExploitatieGroep].[RoyaltyTelGroepID] AS [RoyaltyTelGroepId] FROM [RoyaltyContractExploitatieGroep] WHERE ([RoyaltyContractExploitatieGroep].[RoyaltyContractID] IN (6163 /* @p1 /, 4373 / @p2 /, 6838 / @p3 /, 40116 / @p4 /, 8859 / @p5 /, 6251 / @p6 /, 8241 / @p7 /, 40352 / @p8 */))

SELECT [RoyaltyContractExploitatieGroep].[AfrekenVolgorde], [RoyaltyContractExploitatieGroep].[OmschrijvingOpAfrekening], [RoyaltyContractExploitatieGroep].[RoyaltyContractExploitatieGroepID] AS [RoyaltyContractExploitatieGroepId], [RoyaltyContractExploitatieGroep].[RoyaltyContractID] AS [RoyaltyContractId], [RoyaltyContractExploitatieGroep].[RoyaltyExploitatieGroepID] AS [RoyaltyExploitatieGroepId], [RoyaltyContractExploitatieGroep].[RoyaltyTelGroepID] AS [RoyaltyTelGroepId] FROM [RoyaltyContractExploitatieGroep] WHERE ([RoyaltyContractExploitatieGroep].[RoyaltyContractID] IN (6163, 4373, 6838, 40116, 8859, 6251, 8241, 40352))

THANKS!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39711
Joined: 17-Aug-2003
# Posted on: 16-Jan-2019 10:59:22   

Glad it works! smile

Frans Bouma | Lead developer LLBLGen Pro