Pipeline to fix the odd promotion of AS2To. See StackOverflow – Why field is promoted as AS2ToInternal instead of AS2To This C# pipeline code checks for that issues and fixes it by promoting the proper field. I never found out why it was happening and why it needed to be fixed. <pre> using System; using […]
Month: June 2020
EDI.Net – Library for processing EDI files
Did you ever want to know how to process (parse) or create EDI files by just using .NET C#? There is a great library that can help. I’m working on a new Udemy class that is an Intro to EDI (Electronic Data Interchange). Other than using more expensive enterprise systems like BizTalk, I wanted to […]
PowerShell – Format EDI files and Rename them based on contents
This is an enhancement to a prior blog: PowerShell RegEx Parse EDI. It takes that example to the next step and uses the parsed data to rename the file. It also formats the file by changing the end segment character to the same followed by a carriage-return and line feed. NOTE: Use this program at […]
LINQ/XML Query Expressions Examples
The following relates to the previous two blogs. You can get the surrounding code in that C# LINQ/XML example blog. LINQ can run against different data sources, including XML an SQL. So once you learn how to write the query expressions as shown below, you can switch back and forth between them with ease. This […]
C# LINQ XPath Examples
The following relates to this XML from yesterday’s blog. You can get the surrounding code in that blog. It’s advisable to use the LINQ style of query when possible, but there might be that day where you have a long complicated XPath, and you just want to use with an XElement that you loaded from […]
LINQ XML Navigation Example
Example of how to create XML in memory using LINQ, then how to retrieve elements and attributes from it in the LINQ style. In a future blog, I will show you how to use XPath, and then LINK Query Expressions. This is a sample from Complete Guide to XML for Microsoft Developers (Udemy Course). using […]
Why JavaScript Programmers are so Bonkers for JSON
JavaScript programmers love JSON because it is “baked-in” to the JavaSCript programmnig language. For those of using C#, Python, or Java, we have to use class libraries to assist us with the normal functions that are super-easy in JavaScript. This blog shows you most of you what you need to know about JSON in one […]
Powershell – Build a SQL Statement from rows of text data in NotePad
I needed to update a database table with all the domains I had deleted back in January this year. There were actually about 32 of them, and I have only included a sample of 8 in the code below. I had a series of emails from GoDaddy, so I found it quickest to just enter […]
Linux/Ubuntu Bash Script to Send All Files in a directory via SFTP
The following script can be scheduled as a “CRON JOB”. It looks at all files (optionally with a file mask) in a given directory, and sends them to a specific SFTP site. This example uses a private key, and the name of that key file is passed as the -i argument on the stp command […]
Running a Microsoft SQL XQuery Command with PowerShell (Save Results to Disk)
Microsoft only supports XQuery via SQL Server. So what if you wanted to run a XQuery 1.0 command and save the resuilts to a disk file? Saving to disk files can be a little tricky from SQL. So instead, we can just use SQL as our XQUery engine, run the query, and then save the […]