Been busy - work, antennas, motorcycle

It's been a little since I last made an entry here. I've been busy on a work project. A conglomeration of VB.Net, Lotus Script, VBA, SQL server, DBF and XML stuff. It's nearing test/production and I'll be happy to move on to the next project. I was working on my motorcycle this weekend getting ready summer and came up short some parts. I made the hour and a half round trip to the Harley dealer only to get home to find out he'd given me a male part that I needed as female. That'll have to wait now. Having to special order some vinyl tubing from another dealer too. I'm really anxious to get the bike going again so I can get to the shop and have a new rear tire put on. So, what to do since I couldn't get going on the bike? I built an antenna. A colinear design from the September 2003 QST. It's about 9' tall (I built it for a higher frequency) and it works gang busters! A friend will be putting it to use out at his farm so I'm looking forward to hearing how well it performs there. I may build another one for putting out on a remote weather station. Tonight I played a little QRP portable. I was outside with a random wire (sort of) antenna with a tuner and RG-62 coax. Worked VE6CQ in western Canada. What a blast! He had a bit of a hard time copying me at first, so I switched to the home rig. Copy there was 59/59. We did a quick swap of mics on the FT-817 to the regular mic with the One Big Punch installed and he said the signal was considerably stronger. However, with the set up I had, RF was definately getting back into the mic. Ah well, it was fun!, the Connection Pool & Garbage Collection

How often do we code something like this:

for each object O in ObjectsCollection
    do some stuff
A little background

The SharedFunction.Processing call does some SQL reads. I'm using the SQLHelper from Microsoft.


The problem is that with the above code after about 120 objects O I'm getting an error. Connection Time Out or Max Pool Size reached.

The Cause

It is such a tight loop that garbage collection isn't having a chance to clean up the left over connections from the Processing and WriteToDb.


The solution I used was to force a garbage collection. Then everything is honky dory.

Currently their is a "global" of sorts that carries the SQL Connection string. I didn't want to mess with a global connection as that's just asking for problems. However, an alternate solution could be to refactor SharedFunction.X to be instance functions, instantiate a connection in the instance and reuse it with the instance functions.

After looking at this some more, the alternate solution really isn't that nice to implement. It would require modification of two Business Logic Layer code modules and their associated Data Access Layers. I'd rather not be worrying about carrying a connection around and be more focused on what I'm really trying to accomplish.