Getting “Root element is missing” in a BizTalk Orchestration

I had this case again today, where I got “Root element is missing”. The code was working, I made some changes, and boom, an existing code path started blowing up. It was actually a trace routine, where I had the following code: <pre>    xmlDoc = msgWhatever;    //then I passed as a parameter:     […]

Get the SQL Server Name of BizTalk in C#

Sometimes, you might need to get the SQL Server Name of the SQL Server where the BizTalkMgmtDB The C# code below, uses the registry to get that server name, and also builds a connection screen to some database on that server (where you pass the Database Name as a parameter). MgmtDBServer (in the rk.GetValue below), […]

Speeding up Getting all Files in Directory after a Certain Date

There was a typo below, the first time is using LINQ, the second one is using Directory.GetFiles (then getting the time on each file within a loop). Big Difference, right? The last one is 41 times slower. The difference was not really using LINQ, but using the DirectoryInfo.GetFiles instead of the combination of Directory.GetFiles and […]

C# DateTime and Oracle DateTime ORA-01843

I got this error: ORA-01843 Oracle date format picture ends before converting entire input string The variable fileDateTime was a defined as a normal C# DateTime. Code Failed with ORA=01843                     commSQL.CommandText = "UPDATE MY_TAB " +                         " SET DATE_FILE_PROCESSED = TO_DATE('" + fileDateTime + "', 'MM/DD/YYYY HH:MI:SS')" +                           " WHERE DATE_FILE_PROCESSED IS NULL AND CUST_PO_NO […]

Traverse XML Elements/Values with XmlDocument in C#

I’m in the process of writing a C# program that will validate field sizes (and maybe data types) against a SQL table. I need to traverse through each element and get the element value, the next step will be to validate it each element value. The code below will “walk the tree” structure of the […]