Home > SQL Server, SQLAzure > T-SQL Options

T-SQL Options


Using the options attribute of the SQL Server Producer you can specify extra (platform specific) options on (platform independent) methods.

For instance were you in the need to specify the RECOMPILE option on a stored procedure you could do it as so:

<cf:project xmlns:cf="http://www.softfluent.com/codefluent/2005/1&quot;
            xmlns:cfps="http://www.softfluent.com/codefluent/producers.sqlserver/2005/1&quot;
            defaultNamespace="Sample">
<Test>
   <Id />
   <Name />
   <cf:method name="LoadByName" body="LOAD(Name) WHERE Name = @Name"
              cfps:options="WITH RECOMPILE" />
  </Test>
</cf:project>

Please note that the options attribute isn’t inferred, you could specifying an option here simply copies/pastes it in the output code.

By the way, you can also set hints as shown in this post.

Categories: SQL Server, SQLAzure Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s