The following information is extremely helpful if you find a need to view all of the SQL statements which LLBLGen Pro is generating while executing your project. Sitting back and letting LLBL Gen act like a magical bridge between your objects and your database, but sometimes you really need to know whats going. Perhaps the biggest reason why I decided to dig a little deeper stemmed from the fact that we were on a project with huge scalability concerns.
Add the following to your web.config file following the <system.web> section.
<system.diagnostics>
<switches>
<add name="SqlServerDQE" value="4" />
<add name="AccessDQE" value="4" />
<add name="OracleDQE" value="4" />
<add name="FirebirdDQE" value="4" />
<add name="MySqlDQE" value="4" />
<add name="DB2DQE" value="4" />
<add name="PostgeSqlDQE" value="4" />
<add name="ORMGeneral" value="0" />
<add name="ORMStateManagement" value="0" />
<add name="ORMPersistenceExecution" value="3" />
</switches>
</system.diagnostics>
Watch the Output menu to see what statements are being built and executed by the SqlServer Dynamic Query Engine
Sample output:
Method Exit: CreateSelectDQ
Method Exit: CreatePagingSelectDQ: no paging.
Method Enter: DaoBase.ExecuteMultiRowRetrievalQuery
Method Exit: DaoBase.ExecuteMultiRowRetrievalQuery
Method Exit: DaoBase.PerformGetMultiAction
Method Enter: CreateRowCountDQ
Method Enter: CreateSelectDQ
Method Enter: CreateSelectDQ
Generated Sql query:
Query: SELECT [TableName].[dbo].[Link].[ID] AS [Id], [TableName].[dbo].[Link].[DisplayName], [TableName].[dbo].[Link].[URL] AS [Url], [TableName].[dbo].[Link].[Description], [TableName].[dbo].[Link].[CategoryID] AS [CategoryId] FROM [TableName].[dbo].[Link]
Method Exit: CreateSelectDQ
Generated Sql query:
Query: SELECT COUNT(*) AS NumberOfRows FROM (SELECT [TableName].[dbo].[Link].[ID] AS [Id], [TableName].[dbo].[Link].[DisplayName], [TableName].[dbo].[Link].[URL] AS [Url], [TableName].[dbo].[Link].[Description], [TableName].[dbo].[Link].[CategoryID] AS [CategoryId] FROM [TableName].[dbo].[Link] ) TmpResult
Method Exit: CreateRowCountDQ
Method Enter: DaoBase.ExecuteScalarQuery
Method Exit: DaoBase.ExecuteScalarQuery
Method Enter: DaoBase.PerformGetMultiAction
Method Enter: CreatePagingSelectDQ
Method Enter: CreateSelectDQ
Method Enter: CreateSelectDQ
Generated Sql query:
Query: SELECT [TableName].[dbo].[Link].[ID] AS [Id], [TableName].[dbo].[Link].[DisplayName], [TableName].[dbo].[Link].[URL] AS [Url], [VirginiaAgencyRedesign].[dbo].[Link].[Description], [TableName].[dbo].[Link].[CategoryID] AS [CategoryId] FROM [TableName].[dbo].[Link] ORDER BY [TableName].[dbo].[Link].[DisplayName] ASC
Method Exit: CreateSelectDQ
Generated Sql query:
Query: SELECT TOP 10 [TableName].[dbo].[Link].[ID] AS [Id], [TableName].[dbo].[Link].[DisplayName], [TableName].[dbo].[Link].[URL] AS [Url], [TableName].[dbo].[Link].[Description], [TableName].[dbo].[Link].[CategoryID] AS [CategoryId] FROM [TableName].[dbo].[Link] ORDER BY [TableName].[dbo].[Link].[DisplayName] ASC