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.”

Transact SQL – using xp_sscanf to parse input ( Parse Bible Verse )

  Background Let us use xp_sscanf to parse Bible Verse. Introduction Bible people will say my hope rests on John 3:16 An inquiry mind might want to look up John 3:16. In his or her mind, he will break those words down. In computer jargon, one will tokenize it. Tokens Here are the tokens :- … Continue reading Transact SQL – using xp_sscanf to parse input ( Parse Bible Verse )

ODBC – Error – [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error

  Background Continuing to review ODBC API calls via C. Ran into a simple error. Error Message - #1 - COUNT field incorrect or syntax error Error Image Error Text Code Code Snippet TroubleShooting Issue The issue is the custNameDataLen variable. Documentation The CustNameDataLen variable map to the BufferLength variable. Microsoft Documentation Links SQLBindParameter Function … Continue reading ODBC – Error – [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error

Microsoft Visual C++ – Compiling for 64-bit

Background As I tried to run our little ODBC application noticed that we have not created the targeted ODBC Data Source. Error Error Image Error Text Remediation Created the datasource and as I thought more, opted to consider 64-bit platforms, as well Target - x64 Objective Let us compile our application and target 64-bit bitness. … Continue reading Microsoft Visual C++ – Compiling for 64-bit

ODBC – SQLBindCol Function – Using Microsoft’s sample code – Code Review

Background A quick follow-up to our original post on using the ODBC SQLBindCol function. Lineage ODBC – SQLBindCol Function – Using Microsoft’s sample code Date Published :- 2020-01-01 Link Microsoft Sample Web Site Tried out Microsoft's sample; available here. Docs / SQL ODBC / ODBC Advanced / Microsoft Open Database Connectivity (ODBC)/  ODBC Programmer's Reference … Continue reading ODBC – SQLBindCol Function – Using Microsoft’s sample code – Code Review