Thursday, 4 July 2013

Upgrading / uninstalling SQL 2008r2

This has happened to me before - sometimes when you want to un-install SQL 2008 (including r2) to clean-up before upgrading or re-installing you get an error message saying something like

Warning 26003. Microsoft SQL Server 2008 R2 Setup
Support Files cannot be uninstalled because the
following products are installed:
SQL Server 2008 R2 Common Files
Microsoft SQL Server 2008 R2 RsFx Driver



 
But these items do not appear in the Control Panel | Add/Remove programs applet. So how do you uninstall them?
 
Here's how:
http://myitforum.com/cs2/blogs/jnelson/archive/2011/08/30/159139.aspx

Friday, 14 June 2013

JSON success!

<feeling smug/>

It's a simple thing I know, but here's a screenshot from my Android phone. I have written a web service that wraps the Project Sputnik Assets Business Layer and sends JSON data. The screen shot shows the data in my SQL database on my phone. I just need to put an Android UI together now that can consume the service and render it in a user friendly way!
 

Difficult printers in Windows 7

Ok, so here's another reminder for myself.
From time to time I come across systems that have printers "ghosted" in Devices and Printers. You right-click on them, select "remove" and they're gone .... only they're not! Next reboot, there they are again! Varmits!

It seems that Windows wont remove them if there are documents spooled and un-printed (doesn't matter how old) or sometimes if there are ports that have been created and associated with a printer that are still present.

These instructions help you to remove these pesky items!

  1. Right-click on the desktop, and create a new shortcut with a target of 'cmd.exe'
  2. Right-click on the shortcut and select "Run as Administrator"
  3. Run the printui tool with: printui /s /t2
  4. Try deleting the printers. If that doesn't work...
  5. Click Start > Run > Services.msc
  6. Locate the Print Spooler service and stop it (Right-click > Properties > stop service)
  7. Open My Computer and browse to C:\Windows\System32\spool\Printers
  8. (you will need to say "Continue" or "OK" to get access to this folder)
  9. DELETE the contents of that folder
  10. Restart the Print Spooler service
  11. Go back into the printui utility (might need to restart it using same method as above) and try removing the printers again. This time it should work. If necessary, check the "Ports" tab and remove any TCP/IP ports that are associated with the old printer
  12. Finally, check any other computers on the network to see if any have mapped to the printer. Remove any mappings

Tuesday, 4 June 2013

Calling a SPROC through ODBC with a DSN

This has caused me an issue today. I was creating an ODBC command object (correctly) with a connecting string (also correct) and calling a SPROC that needed two parameters. Again, I had added the parameters in the normal way (used MANY times before) but I kept getting an error "the query xxx requires parameter @yyyy which was not supplied". Turns out you have to re-structure the code as per the article below.


CSS 3.0 validation in Visual Studio 2010

It annoys me that CSS 3.0 validation is not included in VS 2010. At work we make heavy use of Virtual Machine for development environments and with each product release a new VPC Development Environment is created, and some time after that I will need to work on an ASP.NET project. I'll load up the project and get confronted with the usual VSS errors complaining that the Style Sheets contain validation errors because VS is validating against CSS 2.1.

The link below is where to download the installation files for the CSS 3.0 validation tool. Follow the simple installation and there you go!

http://visualstudiogallery.msdn.microsoft.com/a15c3ce9-f58f-42b7-8668-53f6cdc2cd83


Thursday, 30 May 2013

Project Sputnik Solution Structure

A couple of posts ago I mentioned I would upload some screen shots of the Solution. Well here they are. Finally.

This shows the projects with the solution. You can see all the elements required, DAL Interface, the DAL, BLL, Concrete Classes and finally the Thick Client (WinForms app).

 
Focussing on the DAL, here are the DAL classes (one for each table in the DB)
 
 
And finally, the concrete classes (one for each entity)
 
 
 


Tuesday, 28 May 2013

Compacting a VHD

This is something I refer to from time to time - I'm posting here so I can find the link again more quickly in the future...

http://helpdeskgeek.com/how-to/compact-virtual-pc-disk/