Visual Studio – Build – Error – “Exception: The process cannot access the file – obj’ because it is being used by another process.

Background Ran into a little error while trying to build a Visual Studio Project. Error Error Item Image Textual TroubleShooting Outline Trigger PowerShell build\buildtasks.ps1 Get-ChildItem -Recurse bin, obj -Directory | Remove-Item -Recurse -Force Tools Identify which processes are using the targeted folder Microsoft SysInternals handle Trigger Powershell build\buildtasks.ps1 The buildtasks.ps1 script issues this command :- … Continue reading Visual Studio – Build – Error – “Exception: The process cannot access the file – obj’ because it is being used by another process.

File System – Folder Sizes in Powershell

Background Needing to get folder sizes, but did not want to remote desktop to the machine and get the folder size using MS Windows Explorer. Code PowerShell Link Link Body https://gist.github.com/DanielAdeniji/f8f91de6cdeb5e92edb43d20b03287c4 Output  

Powershell – Error – “Error formatting a string: Input string was not in a correct format..”

Background Here is another Powershell error message I received this morning. Error Error Image Code Code - Error Code - Correction Outline The issue is that our connection string contains control characters Database Connection String Original :- Driver={SQL Server};Server={0};Database={1};APP={2}" Revised :- Driver={{SQL Server}};Server={0};Database={1};APP={2}" We escaped { by repeating it Same for }, we escaped by … Continue reading Powershell – Error – “Error formatting a string: Input string was not in a correct format..”

Powershell – Error – InvalidCastFromStringToInteger – “Input string was not in a correct format.”

Background Wanted to quickly document an error message I received earlier today working on a little Powershell script. Error Error Image Error Message Code Code - Error Code - Correction Outline The issue is with trying to divide within the format statement To correct Place parentheses around the arithmetic operation $ts.Milliseconds / 10 becomes ( … Continue reading Powershell – Error – InvalidCastFromStringToInteger – “Input string was not in a correct format.”

PostgreSQL :- XMLTABLE Function

Background A far more easier choice to parse XML data is to use the XMLTable function. Lineage Here are past postings on XML parsing options in PostgreSQL :- XPath XPATH Link   Data Here is a sample of the XML file. Image XMLTABLE Query Outline XMLTable Path /bible/b/c/v Passing Column Name contextxml Columns book path … Continue reading PostgreSQL :- XMLTABLE Function

PostgreSQL :- XPATH Function

Background We have our XML file imported into the database. Objective Let us start to make sense of of it. XPATH We can use the XPATH function to query it. Data Here is what our XML looks like. Image Query Outline Common Table Expression ( CTE ) To compartmentalize things a bit we use a … Continue reading PostgreSQL :- XPATH Function

Transact SQL :- XQuery – Union

Background I have been working with an XML document, but never bothered looking at the DTD. Thankfully Thankfully today I found I was missing some patterns. And, so need to quickly understand how to perform Xpath OR matching; I guess it is called XPath Union. Sample XML Fragment Here is a sample XML fragment. Code … Continue reading Transact SQL :- XQuery – Union