VBA Connection Pooling

Christopher J. McClellan:

Interesting read about Connection Pooling in VBA and SQL Server. I knew circular references are bad juju, but I didn’t know about the “App” property of a connection, or that `conn.Close` doesn’t actually sever the connection. The connection isn’t really severed until the `ADODB.Connection` is garbage collected. Highly recommended reading here.

Originally posted on Ramblings:

I was messing around with SQL Server Profiler recently and thought to myself “this would be a good way to illustrate VBA connection pooling to people”. Many books recommend using connection pooling when building apps that involve more than a trivial amount of SQL database work. Most of those books describe connection pooling and how to perform it, but none backup their assertions with actual proof. Of course, they are correct in what they are saying and connection pooling is a very useful paradigm to implement. This blog post, however, goes one step further and shows you what is happening ‘on the server side’.

The screenshot below you’ll see I’ve got 3 apps open: SQL Server Profiler (top), MS Access VBA IDE (middle) and Task Manager (bottom).


You’ll see I’ve already started a trace on Profiler and also stepped into the VBA procedure ‘TestConnection’.  I have instantiated and instance of…

View original 1,030 more words

Version 1.22 – Hotfix

Christopher J. McClellan:

Squish the bugs. Real blog post coming soon.

Originally posted on Rubberduck News:

There was an issue with some of the features when a password protected VBA Project was loaded. This caused several of the tool window, most notably the Test Explorer, to fail to open. As many of the more popular add-ins are password protected, this was a pretty big problem.

This has been corrected and the 32bit installer is available now. This post will be updated when the 64bit installer is available.

Download the latest version here.

View original

Some Days…

It’s been a crazy day. I found out that we have users on the other side of the globe, Rubberduck doesn’t work in 64 bit versions of Office, and JetBrains gave us a free Open Source license of ReSharper. Oh… And I worked a full day putting out fires at the office. Some times things get surreal. 

I just wanted to share this with everyone and let you know what’s coming down the pipe for the blog. I still owe you a look at what we’re planning for the next minor release of Rubberduck (Hint: it includes support for Office 64x…). I also want to do a small series about VBA attributes over the next few weeks. They’re very cool and under utilized in my opinion. That’s probably because there is next to no documentation available. So, I’m going to pick one or two to talk about at a time and document what I happen to know about them. 

Until then,

Happy Coding.

The Professional VBA Developer

I came across a post on Programmer’s Stack Exchange yesterday that really irked me. It took me a little while to really digest what upset me about it, but I think I understand now. This developer was asking for more reasons to back up his claim that he should move his solution from VBA to C#. That in itself is fine. As I stated in my response, I understand his desire to move his solution to C#. I wish I could move all of my projects to the .Net platform myself.

No. Wanting to move to a more modern technology was not my issue with his question. My problem was with how he acted like working in an old technology gave him a pass on being a professional.

Continue reading

Version 1.2 is here!

Christopher J. McClellan:

Version 1.2 of Rubberduck has arrived. I’ll follow up soon with some thoughts about it and where we’re heading next.

Originally posted on Rubberduck News:

I’m really excited to announce this, so I’ll get to the point…

Version 1.2 just released!

The most visible change is all of the new Code Inspections. There were only a handful of them in Version 1.1, but now Rubberduck is finding all kinds of issues with VBA code. Everything from obsolete syntax to unused variables. It’s really very cool.

The other very visible change is the addition of an Extract Method refactoring tool. Highlight some code, and extract it into its own method. Awesome. This one is very much like the static code analysis was in the last version, just a glimpse at the great things to come.

There were also a lot of improvements under the hood. We entirely swapped out the parser that allows us to do much of what we’ve done. Along with that, we’ve fixed a verifiable crap ton of bugs and UX problems. I’m…

View original 28 more words