<html> <head> <META http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>NQ Optimization On CF2.0</title> <link rel="stylesheet" type="text/css" href="../../../style.css"> </head> <body> <div class="CommonContent"> <div class="CommonContentArea"> <h1>NQ Optimization On CF2.0</h1> <p><font color="#990000">This topic applies to .NET version only</font></p> <span name="cs_wiki_filter" csw_filters="net"> <p>Due to some platform limitations, CompactFramework 2.0 users using the more convenient delegate based Native Query syntax that want their queries to be optimized are required to run the Db4oTool.exe command line utility on their assemblies prior to deploying them. </p> <p> The utility, which can be found in the /bin folder of .NET distribution, is required because the CompactFramework API does not expose any of the delegate metadata needed by the Native Query optimizer. The tool works by augmenting the bytecode with the necessary delegate metadata and replacing ObjectContainer#Query invocations with invocations to a lower level method that makes use of the additional information.</p> <p> The tool can be easily integrated inside Visual Studio.NET 2005 as a Post Build tool by following the simple steps below:</p> <ul> <li>Right click the project you want to enable Native Query optimization for</li> <li>Select<b>'Properties'</b></li> <li>In the Properties Page select the<b>'Build Events'</b> tab</li> <li>In the<b>'Post-build event command line'</b>text box insert the following text <b>"/bin/Db4oTool.exe -nq $(TargetPath)"</b> without the quotes and replacing to the correct value for your system.</li> </ul> <p>A complete example can be found in the src\Db4oTool\Db4oTool.Example directory of the distribution. </p> </span></div> </div> <div id="footer"> This revision (9) was last Modified 2007-11-28T14:39:00 by Tetyana. </div> </body> </html>