Wednesday, September 6, 2023

Buggish: Microsoft Web Excel Copy/Paste

 I totally hate Microsoft's copy/paste feature on its Excel web application. It does not comply with the traditional copy/paste feature.

Certain actions like clicking into a cell will clear the clipboard. Worse yet, some actions appear random. For example, I want to move a part of a text from one cell to another. I double-click, select the text I want, cut, and I see the text disappear. I then double-click in the cell I want to paste, and nothing pastes. Try pasting elsewhere like notepad, nothing... zippo.... nada.... zilch. Undo, and try again... and still the same result.

Because I am insane, I try a third time... and behold... it now pastes. What gives?!

This is definitely not the first time. I believe I have an older post complaining about this copy/paste. It is annoying enough that I may keep posting about it.


Updates

Friday, August 18, 2023

Buggish: Tesla Account Locked, Then Locked Out of Car

I regret purchasing a Tesla.

Account Lock Out, Now I cannot Drive My Car

So, I am trying to lookup my insurance info and try to log in. I sign in, I get to the 2 factor-authentication where it sends a code to my phone. AND IT NEVER COMES! 

Whatever the case... I tried to reset my password to maybe reset the 2FA. WORST MISTAKE! This signs me out of my app and now I cannot use my car at all.



Saturday, August 5, 2023

C# SMO: Unable to get objects by name but able to get by index

Replicating Issue

StoredProcedure sp = db.StoredProcedures["spName"]; // Returns null

Does not return the same as 
StoredProcedure sp = db.StoredProcedures[0]; // Returns object


If I traverse the array (technically a collection), I will find spName. Even if I do:
StoredProcedure sp = db.StoredProcedures[0]; // Returns object
StoredProcedure spByName = db.StoredProcedures[sp.Name]; // returns null


Possible Solution

First I tried. https://www.tek-tips.com/viewthread.cfm?qid=1736324
StoredProcedure storedProcedure =
db.StoredProcedures.Cast<StoredProcedure>().SingleOrDefault(sp => sp.Schema == "YourSchemaName" && sp.Name == "YourSprocName"); 

This worked and this caused me to see that the schema is explicitly entered. After some more research, I could not find how you would provide the schema to the stored procedure name.

Later I tried to look under Database which has a property, DefaultSchema. After setting this, this also returned the correct result.

So the simplest solution:

db.DefaultSchema = "schemaName";
StoredProcedure sp = db.StoredProcedures["spName"]; 

Root Cause Analysis

For my specific case, our DBA changed the default schema of the user.