Skip to main content

Posts

Showing posts from 2010

SSRS 2008 - Getting the schedule of a subscription on a report

After wasting a few hours, I've decided it's not worth it to proceed any further. If you want to know the schedule (or just the next-run-time) of a subscription, just go to the SSRS web site (the web UI). It's too much of a pain to use the ReportingService2005 interface. The simple back-story to this is that I've made an app that handles uploading (create/update) all of our reports (.RDL files) from the local computer to an SSRS instance. Doing this through the web UI is incredibly tedious, error-prone, and my Carpal Tunnel flares up after a few reports. So now that I'm done, I decided that it would be nice to see information about all of the various subscriptions that people have defined for the various reports. It's not hard to add this in. You just call ListSubscriptions(null, null) after logging in with an admin account. But the Subscription object has no information about the schedule it runs against! Well, actually it can tell you a few things via the

Disappearing exceptions (x64)

Hopefully, this will help me the next time I bang my head against the wall trying to figure out why an application of mine is going crazy, but none of my error-handling code seems to be working. The core threads that explain this are here: Visual Studio doesn't break on unhandled exception with windows 64-bit The case of the disappearing OnLoad exception   Silent exceptions on x64 development machines (Microsoft Connect) The summary is this: If an exception is thrown on Windows x64 (Vista, Win2k3, Win2k8, Win7, etc.) and it hits a kernal-mode boundary, it will be dropped. Execution will continue at that point as if no exception had been thrown. The simplest example is to create a new WinForm application and simply throw an exception from the OnLoad event. Not only will VS2008 not stop execution on that exception during debugging, but if you run it in "Release" mode, there will also be no trace of the exception. In this case, your code (OnLoad) was ultimately ca

SqlBulkCopy and the "colid" error

I thought there was a page explaining this somewhere out there on the Internet, but I can't find it anymore. So here's what I re-discovered. When you try to insert the rows from a DataTable and the data in one of the columns of one of the rows is too big to fit into the destination column in the database, you get a SqlException with this error message: "Received an invalid column length from the bcp client for colid N." (Where "N" is a number.) It doesn't tell you which row, and it's a pain to figure out what column to look at. To determine what column it is referring to, you first need to get a listing of all columns in the table, listed in the order as they have been defined in the database. Next, you remove any columns in the list that are not represented in SqlBulkCopy.ColumnMappings (the order of the column mappings is irrelevant). The list that remains is what "colid" is referring to, with the first column corresponding to colid &

Outlook 2007/2010 Search Folders using email address domain

As of May 2010, the Beta of Outlook 2010 still hasn’t overcome this problem. I’m surprised this glaring omission has been left unfixed. Maybe Outlook is maintained by contractors? I have what I consider to be a simple need. I want a “Search Folder” that shows me all the email related to a particular client. What works well for me is a query that finds any email with the client name in the subject, or any email that involves an email address (from/to/cc) from the client's email domain. Back in Thunderbird, it was simple to setup a rule for this. Outlook can't do it. (I'd go back to Thunderbird, but I have to get calendaring working first.) What doesn't work When you edit the criteria for a Search Folder, on the “Messages” tab, the fields you want appear to be represented, but the way things work is wrong. All the criteria specified must be true, not any; they went with “AND” where I need “OR”. The other problem is that the “From…” and “Sent To…” fields use a “starts-with

Because Yes/No isn't good enough

I personally don't believe that Vista/Windows 7's UAC is "enough" for the default setup. You know: the one where there's a single user account on the computer, and maybe the owner bothered to set a password. See, I think UAC is awesome; no software gets free license to do whatever it wants without the user saying OK first. (We only had the "I hate Vista's UAC" stupidity because no software developers bothered to follow Microsoft's guidelines up until that point and took the "everyone's an admin" easy-way-out.) The problem is that most people will still setup their user account as an admin, and the UAC dialog only asks a Yes/No question for administrators. It's the same problem we've had for years. What's the average user going to answer when they're trying to do something (watch a funny video, enter a site a friend told them about, etc.), and something else bugs them with a "You can't continue to do what you

Stupid-Virus 2010

I don't know what exploit just hit, but I have now just finished my 3rd removal attempt of "Internet Security 2010" (aka "AntiVirus 2010", and all the other versions of this virus). I've never seen such a successful attack---but then again, these were all old XP machines. Anyhow, I think I finally have it down now, and I'm writing this to remind myself for next time. Get MalwareBytes Get ProcessExplorer, AutoRuns, and that command-line utility that schedules file renames during Windows' startup. Go to BleepingComputer for their guide, but also their .reg file Put it all on a USB stick So the virus sets a bunch of registry settings so that you can't use Task Manager, change the desktop wallpaper, and a bunch of other annoying things. It also makes it so one of its processes gets loaded in each time you launch an exe---so it has a chance to deny access to it and pretend it's infected. Since MalwareBytes will take care of most of it, use Process