Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
AnxiousADHDGuy513272d10 years my ass and doesnt know what SQLProfiler is? What a looser.
magicMirror10264272dYup. This is never a good idea.
Where I come from, it is called "putting your dick on the table".
He got his chopped off.
I just wanna recap.
He wanted to implement (I think) multiple threaded connections instead of using the connection pool, which is available by default?
But yes, though I'm not an expert in ADO net, usually all connection pools utilize the information from the DSN ( https://en.m.wikipedia.org/wiki/... ) to create an identifier for the connection usually.
Closing connection just releases the connection back into the pool, so it can be reused.
Not closing the connection would mean that the pool fills up with connections till limit reached which is bad idea TM.
... not using an connection pool is a recipe for desaster... Especially when (like in this case as it seems) someone wants to be clever and plays with threads without understanding the consequences.
Each connection has resource limits - too many connections and the server says sayonara bitches. 🙄
Had this many times, cannot recommend the experience. Not funny.
PaperTrail9501272d@IntrusionCM > "He wanted to implement (I think) multiple threaded connections"
TL;DR, there was an ongoing issue with the web site (IIS) running out of TCP/IP connections and somehow correlate the issue with not explicitly calling Close() on the ADO connection (normally allowing the garbage collector to eventually close the connection or termination of the app to close the connection). T's big plan was to modify the entire code base to use try..finally and explicitly close the connection. No proof, no evidence, just him being the biggest in the room and other people doing the work.
One of my biggest wish is nobody remembers me, like that. T has been gone for many, many years and we still talk about him today.
Right now, if I stood up and said
<finger snap> "That's your problem!" , I could get laughter throughout the room with the new guys saying "I don't get it." and many wanting to tell the story.
IntrusionCM13152272d@PaperTrail Uhm. Ouch.
Big brain time.
AnxiousADHDGuy513272d@PaperTrail legendary looser. Why did he quit?
PaperTrail9501272d@AnxiousADHDGuy > "Why did he quit?"
A little involved (read some of my previous rants), but essentially his 'protector' (the department mgr) was fired. 'T' had no one left that he could hide behind. I'm pretty sure it was a "I better quit before I get fired" situation.
Worst fight I've had with a co-worker?
Had my share of 'disagreements', but one that seemed like it could have gone to blows was a developer, 'T', that tried to man-splain me how ADO.Net worked with SQLServer.
<T walks into our work area>
T: "Your solution is going to cause a lot of problems in SQLServer"
Me: "No, its not, your solution is worse. For performance, its better to use ADO.Net connection pooling."
T: "NO! Every single transaction is atomic! SQLServer will prioritize the operation thread, making the whole transaction faster than what you're trying to do."
<T goes on and on about threads, made up nonsense about priority queues, on and on>
Me: "No it won't, unless you change something in the connection string, ADO.Net will utilize connection pooling and use the same SPID, even if you explicitly call Close() on the connection. You are just wasting code thinking that works."
T walks over, stands over me (he's about 6.5", 300+ pounds), maybe 6 inches away
T: "I've been doing .net development for over 10 years. I know what I'm doing!"
I turn my chair to face him, look up, cross my arms.
Me: "I know I'm kinda new to this, but let me show you something ..."
<I threw together a C# console app, simple connect, get some data, close the connection>
Me: "I'll fire up SQLProfiler and we can see the actual connection SPID and when sql server closes the SPID....see....the connection to SQLServer is still has an active SPID after I called Close. When I exit the application, SQLServer will drop the SPD....tada...see?"
T: "Wha...what is that...SQLProfiler? Is that some kind of hacking tool? DBAs should know about that!"
Me: "It's part of the SQLServer client tools, its on everyone's machine, including yours."
T: "Doesn't prove a damn thing! I'm going to do my own experiment and prove my solution works."
Me: "Look forward to seeing what you come up with ... and you haven't been doing .net for 10 years. I was part of the team that reviewed your resume when you were hired. You're going to have to try that on someone else."
About 10 seconds later I hear him from across the room slam his keyboard on his desk.
100% sure he would have kicked my ass, but that day I let him know his bully tactics worked on some, but wouldn't work on me.