Archive for category Programming

Retry Policy in C# for dotnet core

I just published a new article on Code Project with the full source code. How to create and use a Retry Policy utility class to add some resilience to your dotnet projects. This will help in situations where a temporary network or disk failure might cause a transient error in an app. https://www.codeproject.com/Articles/1273180/Retry-Policy

 

, , ,

Leave a comment

jQuery Error 80020101: A fix

I ran into the annoying Could not complete the operation due to error 80020101 bug today. I clearly am not the only one (Google: Could not complete the operation due to error 80020101). This was an old bug in jQuery that was squashed and apparently is back in jQuery 1.7.2 except it isn’t back.
The original bug was related to HTML comments. This was not the cause in my case. It was a query string variable. The fix is simple, take out the query string from the URL.

Change it from this

/Reports.aspx?ReportID=24

to this

/Reports.aspx

EDIT: Alternate Solution

Bruno commented below he this fix was not applicable in his situation. In his case, he needs the querystring. To that end, here is a way to eliminate the issue with a little bit of JavaScript.

You can leave the query string intact and remove it from the webservice URL before making the webservice call with a little bit of javascript. Before calling the webservice, use the following JavaScript to clean the URL and prevent the error

var url = window.location.href.replace(window.location.search, '');

Voilà!
No more Could not complete the operation due to error 80020101

6 Comments

LTRIM RTRIM don’t always work –UDF (UPDATED)

I previously posted on the LTRIM and RTRIM inability to remove certain not printing whitespace characters which can sometimes cause problems. I have updated the SQL page with a User Defined Function (UDF) which can be used in queries or in a stored procedure. I have also included a link to the Code Project article.

Ltrim Rtrim don’t always work

Leave a comment

LTRIM RTRIM don’t work

LTRIM and RTRIM does not work sometimes if the whitespace character is not actually character ASCII 32. This stumped me for a while. The data entry screen used to enter the information somehow allows users to enter other white space characters other than the regular space from the space bar. It could be related to the system encoding, I don’t know. Here is the code I used to fix the LTRIM and RTRM.

Ltrim Rtrim don’t always work

Leave a comment