Enjoy Every Sandwich

Thoughts on SQL, XML, .NET and sometimes beer.

<January 2009>
SuMoTuWeThFrSa
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567


Navigation

Tools

List O'Links

Kent's Other Stuff

Subscriptions

News

Please read these
Notices and Disclamiers

Post Categories

Article Categories



Cool Tools (RSS)

Programs and technologies that I use
MapPoint 2006: I dig it

On Sunday I confessed an interest in things GIS. Recently that interest has been rekindled by the ESRI podcasts and because the MapPoint team was kind enough to send the MVPs a copy of MapPoint 2006. I’ve used MapPoint for things like Driving Directions in the past. MP2004 as pretty good for that, but you could tell the road maps were getting a bit long in the tooth. I also felt it was a good tool for team driving: one person piloting the car, one using MP to navigate.

My first experiment with MP2006 was as an in-drive navigation aid like TomTom or NeverLost. I really only have nits to pick. First, it is hard to hear the voice guidance on my lap given where the speakers are, so I found myself pulling over and cranking up the audio. It still wasn’t as loud as I’d like, but it worked. Having used NeverLost, it really liked its tone telling you that you made correct turn or needed to make a turn now. MP doesn’t give that kind of feedback and I wished it would.

But one thing that I like MP2006 for is that it can record a trip in a trail. You can save the trail right now, but that’s it. I have noticed, however, that you can copy and paste the trail to the clipboard and with a little programming, you can get the data in the trail from the clipboard. What I’ve not fully figured out is how to parse this into useful data. Ideally I’d like to get the position and time data and I do think that’s possible. If and when I figure out how, I’ll post that here.

The other cool thing in MP2006 I’m enjoying the exportability of demographic data to Excel format. For example, I’ve been doing a couple of demos where I’ve extracted the number of households in a given zip code that frequent flyer plans and used SSIS to massage that into SQL Server. It makes for a good test of a lot of data at least.

posted Monday, May 15, 2006 9:23 PM by ktegels

2 Days, 23 Sessions, 3 Tracks. HDC06 Announced!

Doh! Sorry to be late getting this on the wire but the Heartland Developers' Conference for 2006 is has been announced. This year its in Omaha and runs from 26 October and 27 October. Hopefully I won't find myself in China again...

In its 3rd year, HDC06 is the largest independent annual professional Microsoft development conference in the nation, organized by user groups, and focused on .NET development and other emerging Microsoft technologies. HDC provides regional developers the opportunity to experience sessions usually reserved for Tech-Ed and PDC at a much lower cost while retaining the same nationally known presenters. Over 2 days, 23 sessions, 2 tracks, and several networking opportunities, HDC06 is where you’re find top knowledge experts that can prepare you for next level development.

For only $125 Early Bird/$175 standard, each Attendee Pass includes:

1 Conference pass to 2 keynotes and all 23 ninety minute sessions

  • Meals including breakfast, lunch, snacks, and coffee breaks
  • Access to the “Developer Lounge” expo and activity center
  • Wireless internet access throughout conference area
  • Pre conference networking party including drinks and food
  • Thursday night “Developer Jam” including food, drink, and a casino for prizes!
  • Attendee Kit and a chance to win a monster 64 Bit Alienware computer

The speaker list is looking awesome too: Microsoft's own Jeff Brand, Don Bryner and Jacob Cynamon. MVPs Dave Donaldson, Robert Hurlbut, Rocky Lhotka, Javier Lozano and Andrew Troelsen and community rockstars Craig Utley, Phil Wolfe, Robert Boedigheimer, Tim Gifford, Matt Milner and Nick Parker. I'm planning of giving a couple of talks on SQL Server 2005 for Developers.

Register here. And remember, we're talking a mere $125 one of the best Microsoft-focused technical conferences in the Midwest.

posted Tuesday, May 09, 2006 7:08 PM by ktegels

I’m always Sort of out of sorts when that sort of sort sorts that way

There’s an interesting note in the SQL Server 2005 SP1 March CTP, and yes, this is really a bug fix. I’m surprised, however, that more people didn’t get caught by it.  Find the topic “Performing Operations on User-defined Types” in Books-On-Line and look at the change history. You’ll see a note reading:

“Added information about the following behavior change in SQL Server 2005 Service Pack 1: Strings that are returned by user-defined type methods assume the collation of the database in which the user-defined type was created, regardless of the current database.

In the earlier version of SQL Server 2005, strings that are returned by user-defined type methods assume the collation of the current database.”

If you’re not all that familiar with collations in SQL Server, you might not be sure why this really is a fix and not a… well, something else. It is pretty easy to see, however, if you give it a try on the RTM version and the CTP SP1 version. First, start with a simple enough CLR-based User Defined Type. Here’s an example:

using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using System.IO;
[Serializable]
[Microsoft.SqlServer.Server.SqlUserDefinedType(Format.UserDefined,MaxByteSize=8000,IsByteOrdered=true)]
public class SqlStr : INullable,IBinarySerialize
{
    private bool _IsNull = true;
    private string _Str = string.Empty;
    public void Read(BinaryReader r)
    {
        _Str = r.ReadString();
        _IsNull = r.ReadBoolean();
    }
    public void Write(BinaryWriter w)
    {
        w.Write(_Str);
        w.Write(_IsNull);
    }   
    public override string ToString()
    {
        return _Str;
    }
    public bool IsNull
    {
        get
        {
            return _IsNull;
        }
    }
    public static SqlStr Null
    {
        get
        {
            return new SqlStr();
        }
    }
    public static SqlStr Parse(SqlString Source)
    {
        if (Source.IsNull)
            return Null;
        SqlStr s = new SqlStr();
        s._Str = Source.Value;
        s._IsNull = false;
        return s;
    }
}

Okay, so that’s pretty simple. We also need a bit T-SQL to demonstrate this behavior. Run this first in the RTM version of SQL Server 2005, changing the assembly path to work on your machine:

use master
drop database scratch1
drop database scratch2
go
sp_configure 'clr enabled',1
go
reconfigure
go
create database scratch1
alter database scratch1 collate Latin1_General_CI_AI
create database scratch2
alter database scratch2 collate Latin1_General_CS_AI
go
use scratch1
go
create assembly sqlstrAsm
from 'c:\etc\ktegels\SqlStr\SqlStr\bin\Debug\SqlStr.dll'
go
create type SqlStr
external name sqlstrAsm.SqlStr
go
create table dbo.v(id tinyint identity(1,1),s SqlStr)
go
insert into dbo.v values ('ABC')
insert into dbo.v values ('abc')
insert into dbo.v values ('Abc')
insert into dbo.v values ('abC')
insert into dbo.v values ('aBc')
insert into dbo.v values ('aBC')
insert into dbo.v values ('ABc')
insert into dbo.v values ('AbC')
go
select id,s.ToString() from scratch1.dbo.v order by s.ToString()
go
use scratch2
go
select id,s.ToString() from scratch1.dbo.v order by s.ToString()
go
sp_configure 'clr enabled',0
go
reconfigure
go

Your output should be two result sets, the first called from the Scratch1 database, the second, from Scratch2.

id / v
1 / ABC
2 / abc
3 / Abc
4 / abC
5 / aBc
6 / aBC
7 / ABc
8 / AbC

id / v
2 / abc
4 / abC
5 / aBc
6 / aBC
3 / Abc
8 / AbC
7 / ABc
1 / ABC

That makes sense when stop to consider that the second result is being order case sensitively, where as the first set is case insensitive. If you run that same script in SQL Server 2005 Service Pack 1 instances, you get different results. And that’s because the case insensitive ordering of Scratch1 gets used in Scratch2.

id / v
1 / ABC
2 / abc
3 / Abc
4 / abC
5 / aBc
6 / aBC
7 / ABc
8 / AbC

id / v
1 / ABC
2 / abc
3 / Abc
4 / abC
5 / aBc
6 / aBC
7 / ABc
8 / AbC

 So, why isn’t this a change actually a bug? To understand that, you have know what SQL Server does with “normal” string data in cross-collation situations. And that’s easy enough. Change the script to this and run it in the RTM version:

use master
drop database scratch1
drop database scratch2
go
create database scratch1
alter database scratch1 collate Latin1_General_CI_AI
create database scratch2
alter database scratch2 collate Latin1_General_CS_AI
go
use scratch1
go
create table dbo.v(id tinyint identity(1,1),s char(3))
go
insert into dbo.v values ('ABC')
insert into dbo.v values ('abc')
insert into dbo.v values ('Abc')
insert into dbo.v values ('abC')
insert into dbo.v values ('aBc')
insert into dbo.v values ('aBC')
insert into dbo.v values ('ABc')
insert into dbo.v values ('AbC')
go
select id,s as 'v' from scratch1.dbo.v order by s
go
use scratch2
go
select id,s as 'v' from scratch1.dbo.v order by s
go

When you look at the output, you’ll get it. All this change does is make a UDT’s string-returning function behave like another string functions in a cross-collation situation.

So with that sorted out, I’m sort of back to my normal sort of self.

posted Monday, March 20, 2006 12:31 PM by ktegels

Mission Almost Accomplished: SQL Server Express with Advanced Services

LAMP: Linux, Apache, MySQL and PHP. A pretty nice combination of technologies for easily building interactive and Database-backed Websites. I love the concept, its one that Microsoft didn't really captialize on with .NET 1.x. Sure, you had Windows as the OS, not free, but affordable for businesses. You also have IIS which is easy enough to configure and has improved considerable with the introduction of IIS6. And, yes, ASP.NET 1.x was most certainly a great web applicaiton platform. But where was the bit that that competed with MySQL? Well, that was MSDE. Enough said. Little wonder why there's been a lot of interest in SQL Server 2005 Express Edition.

But something about that offering just didn't make out the gate in time. Namely:

  • Like the MSDE story, there wasn't a free GUI for working with yet. For better or worse, XM didn't make it, and SSMSEE wasn't ready at RTM. I'm glad they didn't hold up for it, but its still somewhat holding the ASP.NET 2.0 platform for going head-to-head with LAMP, IMHO.
  • Towards the end of the development cycle of SQL Server 2005, the SQL Team decided that Express Edition really should support Reporting Services and Full-Text search. However, that decision was really made too late in the cycle to include them in the RTM. Microsoft said these features would be available with SP1.

And so they are. Mission almost accomplished. It turns out that a CTP version of SSMSEE is now available at [0], so you can start getting a feel for how tool will help you write great applications. Books On-Line has also been updated to reflect the changes in it. You can download that from [1]. You also download the first CTP for Express Edition with Advanced Services from [2].

I believe the March 2006 CTP version of SQL Server 2005 will show as 9.0.2040.0. Don't worry, it still runs with .NET FX 2.0.50727.42.

[0]: http://www.microsoft.com/downloads/details.aspx?familyid=82afbd59-57a4-455e-a2d6-1d4c98d40f6e&displaylang=en

[1]: http://www.microsoft.com/downloads/thankyou.aspx?familyId=19db0b42-a5b2-456f-9c5c-f295cdd58d7a&displayLang=en&oRef=http%3a%2f%2fwww.microsoft.com%2fsql%2fctp_sp1.mspx

[2]: http://www.microsoft.com/downloads/details.aspx?familyid=57856cdd-da9b-4ad0-9a8a-f193ae8410ad&displaylang=en

Oh, did I mention that if you want to win yourself $10,000 in the Made In Express contest, you can? Sounds like a heck of an opportunity for somebody not only write some really cool code but also put some green in bank.

posted Friday, March 17, 2006 7:17 AM by ktegels

Mixing Native and Managed C++

While I haven't written any C++ for more than half dozen years, there are times I miss it. Last week reminded me of that -- I was at our semi-annual author's retreat and got to meet Marcus Heege.  DevelopMentor is lucky to have some the best C++ folks like Scott Meyers and Marcus in our fold. I got to listen to Marcus talk a bit some of the very interesting things Microsoft has done with the C++ stack for Visual Studio 2005 that allows for the blending of native and managed C++ code. Marcus regularly teaches our Essential C++/CLI course, of course, but he's also got a nice web tutorial on the topic now available from the MSDN C++ Dev Center. Definitely worth a look if you're interested in leveraging .NET but can't give up the power and performance of native C++ code.

posted Thursday, January 12, 2006 9:53 AM by ktegels

Niels is on a roll...

Just in case you live under a rock (like I seem to have been doing recently), my DevelopMentor cohort Niels Berglund has shipped updated versions of his custom SqlClr Project and his GUI for Service Broker. Go check 'em out.

posted Wednesday, December 28, 2005 11:03 AM by ktegels

Well, this is another fine MSSQL you've gotten me into OlleDb...

Sorry, I couldn't resist. And if you're a Perl Monger like me, you shouldn't either. SQL Server MVP Erland Sommarskog has just spun out MSSQL::OlleDB, a mod for working with MSSQL Server using OLE-DB (thus the name). There's a ton of documentation provided too, with examples.

Enjoy!

posted Tuesday, November 15, 2005 4:02 PM by ktegels

Reporting Services 2000 Service Pack 2 Bits Out!

Key Functional Enhancements

  • SharePoint Web parts enable you to explore and view reports located on a report server by using Microsoft Windows SharePoint Services or SharePoint Portal Server.
  • Reports can now be printed directly from within Internet Explorer. A Microsoft ActiveX control is provided to support a rich client-side printing experience including full page preview.

Go get it from http://www.microsoft.com/downloads/details.aspx?FamilyId=502C0D89-1308-4662-8F58-CEC55EF1235B&displaylang=en

posted Saturday, April 23, 2005 9:17 AM by ktegels

Links to CTPs for the other Studio Express SKUs

There seems to be some confusion about if there are "CTP" versions of the other Express product SKUs (other than SQL Server Express, that is...) There most certainly are, and here's a list of links for them:

As along as these use version 2.0.050110 of the .NET CLR, you should be able to use the February 2005 CTP of SQL Server 2005 Express and Express Manager with them.

And of course, remember: These downloads contain a more recent version of the product than the Beta, however, CTP builds do not go through the same rigourous testing that Beta builds undergo. Therefore, do not install these builds on machines you depend on. The new Community Technology Preview releases of the Express products now require registration and activation within 30 days of first use. This process is simple, free, and it allows us to personalize your experience on MSDN. If the products are not registered and activated within 30 days of first use, they will cease operating.

posted Sunday, April 03, 2005 4:52 AM by ktegels

Cingular and MEdiaNET

So I'm looking at Cellphones and I'm pretty sure I want the Nokia 6230 and I'm looking at getting my service through Cigular. I have the option of paying $30 per month for MEdiaNET unlimited which looks to give me an unlimited number of wireless Internet access minutes. So the question becomes, if I buy this phone with that plan, can I use it as a wireless MODEM for a laptop under the terms of MEdiaNET or not.

Plan “B” is to get a PCMCIA Cellular MODEM like the Sony Ericsson GC83 and use Sykpe instead.

I'd really like to have the best of both worlds: a phone unit for when I can't pull my laptop out and use it and unlimited Internet Access for when I can.

Thoughts? Opinions? How are you doing this?

posted Tuesday, March 15, 2005 12:21 PM by ktegels

GoSQLServer Job Forum and RSS feed

Looking for work or people with a passion for SQL Server and other Microsoft Technologies in the Omaha Area? We've just spun up a forum and RSS feed on the Greater Omaha SQL Server User's Group website (http://www.gosqlserver.com/ ) to help you connect. Details here:

http://www.gosqlserver.com/cs/forums/53/ShowPost.aspx

and the RSS feed is at:

http://www.gosqlserver.com/cs/forums/rss.aspx?ForumID=17&Mode=0

The Omaha .NET users group is also keeping a list of local jobs on their site (http://www.funwith.net/)

posted Tuesday, March 15, 2005 9:18 AM by ktegels

Success Breeds Responsibility.

Michael Rys has returned from the XML Technical Plenary where he participated in a panel about the future of XML. It sounds like it was a rather lively discussion! One point that Michael talks about that really rings a bell for me was three simple words -- “Success breeds responsibility.”

Michael framed that in the context of technologies like Binary XML. I think he rightly points that this are potentially fracture points for XML's most useful aspects -- anonymous ubquity. While I really do like the concept compacting payloads in the ways that a binary encoding can, its equally as important to for those folks working on such a standard to keep in mind that there's a fine balance between a “one size fits many” and “one size fits some” standard. Hopefully they will come with something that's both easy to universally implement and allows for domain-specific application application flexibility. Then its a win-win.

But the concept of success breeds responsibility goes beyond just XML or even technology in general. Theres a personal lesson in it for me, and its one I hope to get to blog about later this week.

posted Saturday, March 05, 2005 5:59 AM by ktegels

All you need to know about SQL Server Express and SQL Server Service Broker

Concise, complete and to the point. Somebody give this man a raise!

Thank you yet again, Mr. Desai.

posted Thursday, March 03, 2005 3:04 PM by ktegels

Reporting Services Scripter Rocks!

Fellow SQL Server MVP Jasper Smith has come with a really neat tool named "Reporting Services Scripter" that makes managing multiple Reporting Services installations easier. It enables scripting of all Microsoft SQL Server Reporting Services catalog items to aid in transferring them from one server to another. It can also be used to easily move items on mass from one Reporting Services folder to another on the same server. Depending on the scripting options chosen, Reporting Services Scripter can also transfer all catalog item properties such as Descriptions, History options, Execution options (including report specific and shared schedules) and server side report parameters.

You can download the Reporting Services Scripter here.

posted Thursday, March 03, 2005 2:36 PM by ktegels

Greg Low shows the value of DDL triggers

Aussie SQL Guru Greg Low shares a script the prevents changes to a SQL Server 2005 master database. Too cool.

posted Wednesday, March 02, 2005 5:01 AM by ktegels

Patterns and Practices Live!

I've been seeing that the PAGer's are well are their way to filling my wish list for the Enterprise Library by putting on a number of Webcasts. While you can get more information here (see bottom of the page), Ohad Israeli already has a nice list of direct links.

We're engaging on our first few projects that will be based on these and hopefully I'll have some useful things to say about it here.

posted Tuesday, March 01, 2005 10:06 AM by ktegels

Yo Microsoft! Enterprise Library is great and all but...

Throw me a frick'n bone (or blog or book) here.

What I want, so I can starting learning how to use this magic brick, is a step by step walkthrough of building it into an ASP.NET solution. I'm only interested into doing the minimum required to get the Data Access, Exception, Caching and Logging blocks in my solution since I think I can follow the various quick starts well enough to figure out how to build my code around them.

I'll be the first to admit that while I have looked a the documentation, I'm just not seeing the entry points to this specific procedure.

I'll also be the first to buy the "dead tree" version of the documentation when its ready.

posted Wednesday, February 23, 2005 11:49 AM by ktegels

Kick'n GoSQLServer's Website up to notches unknown with Community Server!

I'm pleased to announce that the Greater Omaha SQL Server Users' Group web site has been "kicked up to notches unknown" with the introduction of Telligent's Community Server! This means that our members can now have blogs and can engage with each other in our forums.

Interested in joining in the fun? Just log into the registration page to create yourself an account, then dive right in.Or just subscribe to our Announcement RSS feed for news about group events, then come join us.

Bah-BAM!

posted Saturday, February 19, 2005 12:21 PM by ktegels

16 bits worth looking at

Its not so much that I've lazy the last few days... but I've built up a pile of things I wanted to talk about:

  • Rushi Desai talks about a Framework that simplifies building Service Broker Apps. Way cool, I think.
  • Michael Rys talks about the updated XQuery drafts. Something I'm not sure I get quite yet about the update spec is why Isolation is a should and not a must.
  • Moshe Eshel ask a good question SQL Server 2000. How do you make composite types work with VB6.
  • There's a lot of feedback about Binary XML from Mark Fussell. I'm still trying to sort out exactly how I feel about that topic. There's lots of reasons to do it, I think, but yes, everybody is either going to have to support whatever comes out as a standard or its not going to be as successfull as it should.
  • I think there's a a fine grain of difference between "Contract First" thinking and what Dare talks as having problems when it comes to implementations of it. I do think he's right though: when you think "Contract First" you do have to leave behind specifics of a toolkit and focus on the abstracts to be successful. That's not a bad thing.
  • Anybody want to pay for me to go to Insbrook in June? Why would I want to? Frameworks for Semantics in Web Services. Now that's progress on something useful, I think.
  • DonXML writes up a pretty good summary of the whole Send Messages Not Serialized Object Graphs discussion that's been going on.
  • For now for something completely different: Flash and Databases in a few easy steps. Nice.
  • Jeff Brand's mandatory where to go get more on Indigo posting.
  • John Tobler brought up the XSD Inference Utility which is a nice alternative to XSD.EXE, especially since it offers an API for doing it.
  • Dare talks about Tim Ewalds three Web Services stacks. Maybe I'm just too Joe Average, but it seems to me that 75% of the problems I need to solve I can with Plain Old Soap and the other 25% can be done with WS-*. Not sure why I choose to limit myself to a specific toolkit when I didn't need to.
  • Aaron Weiker is quickly turning into one of my favorite East Coast Geeks. Why? He finds cool tools.
  • All you could want to know today about WinFX
  • Don't like how Reporting Services renders a report? Write your own custom rendering stuff.
  • I like Phil Wolfe, even when he say crazy stuff like do do remoting.. Crazy talk, man, carzy.
  • Rocky frames Indigo as n-tier client server? Not really but makes a good case for why that's a concern.

posted Tuesday, February 15, 2005 6:18 PM by ktegels

Is there a reflector For SQLCLR Objects?
Yep. Sweet. Via Denis Bauer -- you've just got to check this out.

posted Tuesday, February 08, 2005 12:11 PM by