Archives

Archives / 2007 / September
  • Case Sensitive or Insensitive SQL Query

    Suppose you need to perform a SQL query and you need for it to be case sensitive or case insensitive, and either your database is set up the opposite way or you're smart and you're trying to write your query so that it will work regardless of how the database may or may not be configured.  For instance, consider this query:SELECT UserId, emailFROM aspnet_membership WHERE email = 'billg@microsoft.com' If your database contains an email for Bill like this one: BillG@microsoft.com then whether or not your query will return any rows will depend on the COLLATION for the database.  If you want to ensure that you DO get results, you can force it to use a CASE INSENSITIVE … more

  • Installing SQL 2005 Management Studio

    I've installed SQL Server on a few dev boxes in my time, and one thing I've noted on several occasion is that even if you check the box during the install to say you want to install all of the client tools, usually they don't install.  You think they installed, the setup dialog said it would install them, but when everything is said and done you don't see anything in the Start-Programs menu except a SQL Configuration option.  What gives? So you install again, only this time the setup dialog tells you nothing's going to change because the client tools were already installed last time.  But they weren't.  Eventually, I've managed to get them installed, but it was usually a … more

  • AJAX Control Toolkit Update September 2007

    The AJAX Control Toolkit just released a new version for September 2007.  You can get version 10920 now from CodePlex.  This release is meant to improve the stability and quality of the controls and includes a bunch of fixes both at the general and control-specific level.  There are no new controls in this release.  You can view live demos of the toolkit controls on the AJAX Control Toolkit Sample Site. more

  • Using PowerShell to Automate a SQL Task

    I have a very large table in a SQL database that I need to clean up some old data on.  I've already copied all of the data to another table in another database with a different schema.  I have a legacy application that still uses the old data, but the data goes back for years, and now that it's in the new system, I'm willing to remove at least everything up until the new system started running alongside the old one. Deleting thousands of rows in SQL Server is an annoyingly difficult task on a disk-deficient server because inevitably the transaction log fills up and the delete statement fails.  If I had plenty of disk space, I could get round this issue through cleverness like … more

  • Consolas Font in Vista

    I've recently been experimenting with other fonts for Visual Studio on Vista after reading this article on new fonts in Vista.  I think I like Consolas better than Courier New for coding, if only for its novelty.  It also tends to be a little bit more compact than Courier New at the same font size, which is nice to keep long lines from wrapping.  Have a look at the difference, see what you think:Consolas Font, 10 pt: Courier New Font, 10 pt: As you can see, the Consolas Font is a fair bit narrower horizontally than Courier New, and I don't find it particularly harder to read, so I really like that.  Horizontal space is always at a premium - one place … more

  • Managing XSD Files - if you must have them

    For an admin application I've been working on, we're using a third party reporting tool to serve up reports to our users over the Internet.  The reports have a nice designer that works with XSD files in Visual Studio.  Not particularly fond of XSDs as a means of data access, I thought I would limit the damage by having only one of them (and worse yet, the XSD file(s) have to be in the root of the website).  Unfortunately, by the time we were up to our 5th or 6th report and we had about 10 DataTables and TableAdapters in the XSD file, it was generating upwards of 10,000 lines of code.  This resulted in delays of 10 or more seconds just to open or save the XSD file, with … more

  • FIX Request format is unrecognized for URL unexpectedly ending in

    Adding a new web service to an application today so that I can delay loading some web user controls and ran into this 500 Error when calling the web service:Request format is unrecognized for URL unexpectedly ending in /GetHtmlFound this KB article with the fix:Add the following to web.config since GET and POST are disabled by default in ASP.NET 2.0 and greater:<configuration> <system.web> <webServices> <protocols> <add name="HttpGet"/> <add name="HttpPost"/> </protocols> </webServices> </system.web> </configuration>I'd forgotten this little detail... more