Mass Delete of Old Rows in T-SQL

I have a SQL/Trace, and it’s a requirement to each night delete all rows in the Trace over x days old. This is typically called a purge program, or mass delete. If you don’t limit the data, then you can knock the lights out of SQL. Below is a modification to code I found here: […]

VBScript Function to Count Rows in a CSV File

I was working with an old third party tool that only supported VBScript for programming.  I needed to email a file if the file had more than one row.  All the CSV (Comma Separated Value) files created had the CSV headers on the first line. Basically, this was an error/exception report, so I only wanted […]

VBScript Date Formatting For Filenames

Below is just a code fragment that creates a date useful for putting on a filename. It’s not particular elegant, and there are other ways to do the same thing (for example using the PAD function). But it works and it’s easy to read and change. dtYear  = year(date) dtMonth = Right(String(2,"0") & Month(date), 2) dtDay   […]

VBScript Function to Delete Files in Directory matching name over x days old

Yes, it’s the year 2015, and I still find myself creating VBScripts from time to time. My client has an old server that uses a third party tool to do database extracts, and it supports only VBScript. So we have scripts that email CSV (Comma Separated Value) extracts, and/or copy them to various folders on […]

Error Handler – Issue with xmlDocument losing value because of Scope/Throw

We all hate to use Atomic Scopes in BizTalk orchestrations when not needed.  I have a static C# Trace routine that normally takes passing an enum of System.Diagnostics.TraceLevel (for Error, Warning, Info, etc…).   In the current project, our web services can return “soft errors” in a common field called “Result”. So I could have used […]

Error: a non transactional scope ‘unnamed’ may not contain a transactional scope

Here are some helps for this error that I got today: Error: a non transactional scope 'unnamed' may not contain a transactional scope 'Transaction_3" When you click on the error in the Visual Studio Error list, it should take you to one of the scopes involved in the error. In my case, I had a […]

getNonce() – a C# routine to generate the Nonce code for WS-Security

I created this code to generate a unique Nonce code. This relates back to this post about BizTalk calling a webservice with Basic Authenticiation. Message Assignment is prior blog was updated to call C# business component: <pre> xmlDocSoapHeader.LoadXml(    "<headers>" +    "<wsse:Security mustUnderstand=\"1\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">" +    "<wsse:UsernameToken wsu:Id=\"UsernameToken-E4E3CB1F68472DCF2914369675811859\">" +      "  <wsse:Username>" + strServiceBenchUserID […]

Where does message text in the BizTalk Terminate statement go?

Have you been looking for how to find the string text specified in the BizTalk Terminate Shape?  I hadn’t used this shape in a long long time, and had to check it out again this week.  This blog show you you where the Terminate Shape text goes. After your orchestration has hit a Terminate statement, […]