Author: way0utwest

  • Live Writer – Paste from Visual Studio

    This is a test of the plug in “Paste From Visual Studio”. I had this code sitting in SSMS and I did a CTRL+C to copy it to the clipboard. Then I clicked the “from Visual Studio shortcut that’s in my LiveWriter (image below) and this appeared.

    ALTER DATABASE db1 SET SINGLE_USER

    ALTER DATABASE
    db1 SET MULTI_USER

    SELECT TOP
    2
    *
    FROM sys.database_files
    WHERE data_space_id > 1
    Hopefully this translates in syndication well. Here’s the way LiveWriter has this listed now:
    LiveWriter_Paste 

  • Formatting Code in LiveWriter

    I was getting tired of pre-formatting code in LiveWriter. I love that software, but a couple of the technical things are a PIA. So after messing with this for weeks, hand fixing code blocks, I did the smart thing and Google’d for a plug in.

    I found this one, Insert Code for Windows Live Writer, which seems to work well. It installs another “insert” level item called Code

    LiveWriter

    I can click that, paste in code, and it color codes it. Here’s a sample snippet of T-SQL.

    --===== Simple sum/total for each year
    SELECT Year,
    SUM(Amount) AS Total
    FROM #SomeTable1
    GROUP BY Year
    ORDER BY Year
    .csharpcode, .csharpcode pre
    {
    font-size: small;
    color: black;
    font-family: consolas, "Courier New", courier, monospace;
    background-color: #ffffff;
    /*white-space: pre;*/
    }
    .csharpcode pre { margin: 0em; }
    .csharpcode .rem { color: #008000; }
    .csharpcode .kwrd { color: #0000ff; }
    .csharpcode .str { color: #006080; }
    .csharpcode .op { color: #0000c0; }
    .csharpcode .preproc { color: #cc6633; }
    .csharpcode .asp { background-color: #ffff00; }
    .csharpcode .html { color: #800000; }
    .csharpcode .attr { color: #ff0000; }
    .csharpcode .alt
    {
    background-color: #f4f4f4;
    width: 100%;
    margin: 0em;
    }
    .csharpcode .lnum { color: #606060; }

    I picked that up from Jeff Moden’s article cut and pasted it in here. Looks great to me. We’ll see how it holds up. The only downside so far is that it defaults to C# and I have to switch it to TSQL.

  • 24 Hours of PASS – A Week Away

    24HrsPASS_984x183[1]

    There’s still time to register for the 24 Hours of PASS, a series of 24 one-hour sessions being presented on May 19-20, 2010. There’s an amazing lineup of speakers, including:

    • Brian Knight
    • Kevin Cox of SQL CAT
    • Donald Farmer
    • Jessica Moss
    • Kevin Kline
    • and more!

    I participated in this last year, and it was great fun. I managed to even watch 2-3 sessions across the 24 hours, but work definitely got in the way. 

    This year I’m not participating since this is high school graduation week for my son, and I’m actually on vacation these days. So I’ll miss out, but I’m looking forward to seeing a few of these sessions on recordings later on.

    Be sure to register today, and block out some time on your calendar for the sessions you’re interested in.

  • Twitter is…

    I think Twitter is a graffiti wall that emulates a series of hallway conversations near the world’s largest food court.