Option Explicit In Biml VB

Kevin Feasel

2017-07-05

Biml

Ben Weissman now has nothing to stop him from writing bad VB code in Biml:

Previously, you had to declare any kind of variable and object type (instead of just using something like “var” in C#):

1
2
3
4
5
6
7
8
<#@template Language="VB" #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<# for n as integer = 1 to 25 #>
    <Package Name="MyAutomatedBiml<#= n #>"/>
<# next#>
</Packages>
</Biml>

That was true even for the most simple cases like for n as integer = 1 to 25 instead of just for n = 1 to 25, even though it is clear that his can never be anything else in this context.

Now, you can use two new attributes in the template definition: optionexplicit and/or optionstrict

Read the whole thing if you want to write VB code in Biml.  If you want to write C# code in Biml, keep doing your thing.  If you want to write F# in Biml, the pitchfork mob is organizing over here.

Related Posts

Using Biml With Azure Data Factory v2

Kevin Feasel

2018-03-14

Biml, Cloud

Ben Weissman shows how you can use BimlStudio to build ADF v2 flows: As you may have seen at PASS Summit 2017 or another event, with the announcement of Azure Data Factory v2 (adf), Biml will natively support adf objects. Please note, that the native support is currently only available in BimlStudio 2018. If you’re […]

Read More

Building A Biml Project: Adding Tasks

Kevin Feasel

2018-02-28

Biml

Martin Schoombee continues his series on building a Biml project by adding SSIS tasks: The <DirectInput> tag is pretty self-explanatory and executes the stored procedure (in this case). It could also have been a SQL query. The <Results> element contains a <Result> child element for each field returned in our query. I found this a little confusing at first, but the Name property’s […]

Read More

Categories

July 2017
MTWTFSS
« Jun Aug »
 12
3456789
10111213141516
17181920212223
24252627282930
31