1

I'm using LLBLGen to access a SQL Express database using LLBLGen runtime framework. Using Visual Studio 2010.

I have created a predicate expression, however It does not seem to be doing what I thought it should, how can I view the Generated SQL sent to the database?

thank you in advance.

Craig
  • 381
  • 5
  • 22
  • If you have a license for SQL Server developer edition (I know you said you use Express, but since dev version is very cheap I'm suggesting it) you can use SQL profiler. – Fedor Hajdu Jun 27 '12 at 13:14
  • I have viewed the SQL before, however I can't remember how it's done. I believe there is a window in visual studio that can be opened to view the sent transaction. – Craig Jun 27 '12 at 13:19

2 Answers2

2

For 2.6:

http://www.llblgen.com/documentation/2.6/hh_start.htm

You will want to use the ORMPersistenceExecution switch.

If it's another version, all the docs can be found here:

http://www.llblgen.com/documentation/

Phil Sandler
  • 27,544
  • 21
  • 86
  • 147
  • 1
    Those links don't actually lead to a page containing the info needed. You have to search from them or something. Could you please bring over the explanation into your answer? – jpmc26 May 24 '17 at 19:14
2

You can enable the build-in tracing, which you can configure like this (the value being the log level threshold):

<system.diagnostics>
    <switches>
        <add name="SqlServerDQE" value="3" />
        <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="PostgreSqlDQE" value="4" />
        <add name="SybaseAsaDQE" value="4" />
        <add name="SybaseAseDQE" value="4" />
        <add name="ORMGeneral" value="0" />
        <add name="ORMStateManagement" value="0" />
        <add name="ORMPersistenceExecution" value="3" />
        <add name="LinqExpressionHandler" value="3" />
    </switches>
</system.diagnostics>

I can also recommend getting a profiler if you're doing a lot of development/debugging:

http://www.ormprofiler.com/ (by Frans Bouma)

http://llblgenprof.com/ (by Ayende)

Wiebe Tijsma
  • 10,173
  • 5
  • 52
  • 68