November 2004 - Posts

Microsoft has recently released the final version of the Issue Tracker Starter Kit. The kit was built using asp.net and allows projects to track outstanding issues. I know there are much better solutions out there but you can't beat the price (free). Since I have been using the Issue Tracker Starter Kit when it was in beta and I needed to move my current project data to the new issue tracker database. Luckily for me no data structure changes were made so that made my SQL script really simple. If you need to use this script replace IssueTrackerOld with the name of your old Issue Tracker database and execute.

SET IDENTITY_INSERT issueTracker_Users ON
INSERT INTO issueTracker_Users (UserId, UserName, UserPassword, RoleId, Email, DisplayName)
SELECT UserId, UserName, UserPassword, RoleId, Email, DisplayName FROM IssueTrackerOld..issueTracker_Users
SET IDENTITY_INSERT issueTracker_Users OFF
 
SET IDENTITY_INSERT issueTracker_projects ON
INSERT INTO issueTracker_projects (ProjectId, ProjectName, ProjectDescription, ProjectCreatorId, ProjectManagerId, ProjectCreationDate, ProjectDisabled)
SELECT ProjectId, ProjectName, ProjectDescription, ProjectCreatorId, ProjectManagerId, ProjectCreationDate, ProjectDisabled FROM IssueTrackerOld..issueTracker_projects
SET IDENTITY_INSERT issueTracker_projects OFF
 
SET IDENTITY_INSERT issueTracker_projectStatus ON
INSERT INTO issueTracker_projectStatus (StatusId, ProjectId, StatusName, StatusImageUrl, DateCreated)
SELECT StatusId, ProjectId, StatusName, StatusImageUrl, DateCreated FROM IssueTrackerOld..issueTracker_projectStatus
SET IDENTITY_INSERT issueTracker_projectStatus OFF
 
SET IDENTITY_INSERT issueTracker_projectPriorities ON
INSERT INTO issueTracker_projectPriorities(PriorityId, ProjectId, PriorityName, PriorityImageUrl, DateCreated)
SELECT PriorityId, ProjectId, PriorityName, PriorityImageUrl, DateCreated FROM IssueTrackerOld..issueTracker_projectPriorities
SET IDENTITY_INSERT issueTracker_projectPriorities OFF
 
SET IDENTITY_INSERT issueTracker_projectMilestones ON
INSERT INTO issueTracker_projectMilestones(MilestoneId, ProjectId, MilestoneName, MilestoneImageUrl, DateCreated)
SELECT * FROM IssueTrackerOld..issueTracker_projectMilestones
SET IDENTITY_INSERT issueTracker_projectMilestones OFF
 
INSERT INTO issueTracker_projectMembers (UserId, ProjectId)
SELECT UserId, ProjectId FROM IssueTrackerOld..issueTracker_projectMembers
 
SET IDENTITY_INSERT issueTracker_projectCustomFields ON
INSERT INTO issueTracker_projectCustomFields(CustomFieldId, ProjectId, CustomFieldName, CustomFieldRequired, CustomFieldDataType)
SELECT CustomFieldId, ProjectId, CustomFieldName, CustomFieldRequired, CustomFieldDataType FROM IssueTrackerOld..issueTracker_projectCustomFields
SET IDENTITY_INSERT issueTracker_projectCustomFields OFF
 
INSERT INTO issueTracker_projectCustomFieldValues (IssueId, CustomFieldId, CustomFieldValue)
SELECT IssueId, CustomFieldId, CustomFieldValue FROM IssueTrackerOld..issueTracker_projectCustomFieldValues
 
SET IDENTITY_INSERT issueTracker_projectCategories ON
INSERT INTO issueTracker_projectCategories(CategoryId, CategoryName, ProjectId, ParentCategoryId)
SELECT CategoryId, CategoryName, ProjectId, ParentCategoryId FROM IssueTrackerOld..issueTracker_projectCategories
SET IDENTITY_INSERT issueTracker_projectCategories OFF
 
SET IDENTITY_INSERT issueTracker_Issues ON
INSERT INTO issueTracker_Issues (IssueId, ProjectId, IssueTitle, IssueCategoryId, IssueMilestoneId, IssuePriorityId, IssueStatusId, IssueCreatorId, IssueOwnerId, IssueAssignedId, DateCreated, Disabled)
SELECT IssueId, ProjectId, IssueTitle, IssueCategoryId, IssueMilestoneId, IssuePriorityId, IssueStatusId, IssueCreatorId, IssueOwnerId, IssueAssignedId, DateCreated, Disabled FROM IssueTrackerOld..issueTracker_Issues
SET IDENTITY_INSERT issueTracker_Issues OFF
 
SET IDENTITY_INSERT issueTracker_IssueNotifications ON
INSERT INTO issueTracker_IssueNotifications(NotificationId, IssueId, UserId)
SELECT NotificationId, IssueId, UserId FROM IssueTrackerOld..issueTracker_IssueNotifications
SET IDENTITY_INSERT issueTracker_IssueNotifications OFF
 
SET IDENTITY_INSERT issueTracker_IssueHistory ON
INSERT INTO issueTracker_IssueHistory (HistoryId, IssueId, HistoryUserId, DateCreated)
SELECT HistoryId, IssueId, HistoryUserId, DateCreated FROM IssueTrackerOld..issueTracker_IssueHistory
SET IDENTITY_INSERT issueTracker_IssueHistory OFF
 
SET IDENTITY_INSERT issueTracker_IssueComments ON
INSERT INTO issueTracker_IssueComments (CommentId, IssueId, Comment, UserId, DateCreated)
SELECT CommentId, IssueId, Comment, UserId, DateCreated FROM IssueTrackerOld..issueTracker_IssueComments
SET IDENTITY_INSERT issueTracker_IssueComments OFF
 
INSERT INTO issueTracker_RelatedIssues (PrimaryIssueId, SecondaryIssueId, RelationType)
SELECT PrimaryIssueId, SecondaryIssueId, RelationType FROM IssueTrackerOld..issueTracker_RelatedIssues
 
SET IDENTITY_INSERT issueTracker_Queries ON
INSERT INTO issueTracker_Queries (QueryId, UserId, ProjectId, QueryName)
SELECT QueryId, UserId, ProjectId, QueryName FROM IssueTrackerOld..issueTracker_Queries
SET IDENTITY_INSERT issueTracker_Queries OFF
 
INSERT INTO issueTracker_QueryClauses (QueryId, BooleanOperator, FieldName, ComparisonOperator, FieldValue, DataType)
SELECT QueryId, BooleanOperator, FieldName, ComparisonOperator, FieldValue, DataType FROM IssueTrackerOld..issueTracker_QueryClauses
 

Now Playing: Mortal Treason - Khampa Nomads

Posted by Jorriss | with no comments
Filed under: ,

Found this nice article on MSDN on Windows Forms Dialog Boxes. It includes loads of helpful code.

Now Playing: Denison Marrs - Send Me an Angel

Posted by Jorriss | with no comments
Filed under:

Today I spent most of my day integrating the Updater Application Block into the Windows app that I'm creating. I must say it works quite well. Here are some of the resources that I found useful in implementing the block.

MSDN Updater Application Block Webcast: This webcast was presented by Chris Kinsman. Excellent webcast. Chris goes through loads of demos to accompany the standard MS presentation. Start here first.

How-To for the Updater Application Block: Nice blow-by-blow walkthrough for integrating the Updater in your application. It's not 100% correct but it's the most complete how-to that I found.

Keep your Apps Fresh with the MS Updater Application Block: This article gives an overview of the Updater block and gives some suggestions on how to fix it's shortcomings.

Updater Applicaon Block for .NET Config Problem Thread: I had a problem loading the config file due to a bad path. This post pointed me in the right direction.

Create a Self-Updating WinForms App with the Application Updater Block: More of the same but a good how-to nonetheless.

Duncan Mackenzie's Blog: Loads of good stuff on the Updater block.

Now Playing: The Hooters - And We Danced

Posted by Jorriss | with no comments
Filed under:

I really think that SQL Server 2005 will change the way we think about storing our data and how we use it. If you're interested on what SQL Server 2005 can do tune into these webcasts. Maybe if you're lucky you'll see me. I'm the idiot changing my status color to make my seat "blink". (Thanks to G. Andrew Duthie for the heads up.)

Overview of the new Developer features in SQL Server 2005—Level 200
Monday, December 6, 2004
10:00–11:00 A.M. Pacific Time, United States and Canada (UTC-8)
The release of SQL Server 2005 brings with it many new productivity enhancements for the database developer. This webcast will give you a brief overview of the major new developer features of SQL Server 2005.
  

Introducing the New SQL Server Management Studio—Level 100
Monday, December 6, 2004
1:00–2:00 P.M. Pacific Time, United States and Canada (UTC-8)
Get an overview of the new tools in SQL Server 2005, including SQL Server Management Studio, Database Tuning Advisor, Business Intelligence Development Studio and SQLCMD. Also see the enhancements that have been made to existing tools such as Profiler and SQL Agent.
  

SQL Server 2005 as a .NET Runtime Host—Level 100
Monday, December 6, 2004
3:00–4:00 P.M. Pacific Time, United States and Canada (UTC-8)
See how to create database objects such as user-defined types and aggregates in SQL Server 2005, using familiar languages such as C# and Visual Basic .NET.
  

Introducing XML in SQL Server 2005—Level 200
Tuesday, December 7, 2004
10:00–11:00 A.M. Pacific Time, United States and Canada (UTC-8)
Learn what the new XML data type will mean to your database applications, and see some simple examples of how to utilize this new feature.
  

Introducing ADO.NET 2.0 for SQL Server 2005—Level 200
Tuesday, December 7, 2004
12:00–1:00 P.M. Pacific Time, United States and Canada (UTC-8)
See how SQL Server 2005 provides greater scalability and flexibility in dataset access and manipulation, using the enhancements available in ADO.NET 2.0
  

T-SQL Enhancements in SQL Server 2005—Level 200
Tuesday, December 7, 2004
3:00–4:00 P.M. Pacific Time, United States and Canada (UTC-8)
By now you have heard that you can write stored procedures in C# and VB .NET for SQL Server 2005. Does that mean TSQL is dead? NO! A lot has changed in the world of TSQL for SQL Server 2005. Come see the new features of T-SQL for SQL Server 2005, including features such as error handling and XML manipulation, that have been added to make developing with SQL Server easier and more productive.
  

The New Security Model in SQL Server 2005—Level 200
Wednesday, December 8, 2004
10:00–11:00 A.M. Pacific Time, United States and Canada (UTC-8)
SQL Server 2005 brings with it many changes to the traditional SQL Server security model. Attend this webcast to learn about the new security model and the basic concepts behind it, as well as new security features such as data encryption.
  

Introducing Web Services in SQL Server 2005—Level 200
Wednesday, December 8, 2004
1:00–2:00 P.M. Pacific Time, United States and Canada (UTC-8)
Learn about the new Web service features in SQL Server 2005, such as supporting XML as a first-class data type, providing a new query language for XML documents, and allowing you to perform in-place modifications.
  

Introducing Service Broker in SQL Server 2005—Level 200
Wednesday, December 8, 2004
3:00–4:00 P.M. Pacific Time, United States and Canada (UTC-8)
Learn more about SQL Server 2005 Service Broker, a new feature that allows you to build reliable, scalable, asynchronous, queued database applications. Get an overview of the major features of the Service Broker, including queues as database objects; data integrity for queued messages; activation of processing logic triggered by message arrival; and reliable, transactional delivery of messages between SQL Server instances.
  

Introducing Reporting Services for SQL Server 2005—Level 200
Thursday, December 9, 2004
10:00–11:00 A.M. Pacific Time, United States and Canada (UTC-8)
Register today to find out more about the Reporting Services enhancements that will be available in SQL Server 2005.
  

Introducing SQL Server Integration Services for SQL Server 2005—Level 200
Thursday, December 9, 2004
1:00–2:00 P.M. Pacific Time, United States and Canada (UTC-8)
See what Integration Services (formerly DTS) can do to make your data loading and transformation tasks faster and easier.
  

Introducing SQL Server 2005 Analysis Services for Developers—Level 200
Thursday, December 9, 2004
3:00–4:00 P.M. Pacific Time, United States and Canada (UTC-8)
Get an introduction to the main developer features of Analysis Services. This includes an overview of the Unified Dimensional Model (UDM) which provides a rich layer of meta data over a relational source, to provide the best of both traditional OLAP based reporting (performance and analytical capabilities) and relational reporting (currency of the data, and flexibility).
  

Introducing Full-Text Search in SQL Server 2005—Level 200
Friday, December 10, 2004
10:00–11:00 A.M. Pacific Time, United States and Canada (UTC-8)
Join this webcast for coverage of the fundamentals of full-text search in SQL Server 2005, including an examination of the new features and performance upgrades that have been introduced in SQL Server 2005 to support this new feature.
  

Introducing Replication in SQL Server 2005—Level 200
Friday, December 10, 2004
1:00–2:00 P.M. Pacific Time, United States and Canada (UTC-8)
Get an overview of the new Replication features in SQL Server 2005. See how ease of use and monitoring has been greatly enhanced, along with the ability to synchronize subscriptions over the Internet. We'll also cover replicating new SQL Server 2005 data types and the many improvements in merge replication scalability.
  

Introducing Notification Services in SQL Server 2005—Level 200
Friday, December 10, 2004
3:00–4:00 P.M. Pacific Time, United States and Canada (UTC-8)
Get more information about the Notification Services enhancements in SQL Server 2005. Learn about notification applications and how Notification Services in SQL Server 2005 can make it easier for you to build and deploy these applications.


Posted by Jorriss | with no comments
Filed under:

I'm thinking about modifying the list control in the IssueVision application to use data binding. Then I find this article Creating a Data Bound ListView Control by Rocky Lhotka. Perfect. If I decide to make the modification I'll post my notes.

Update: I've abandoned my generalizing efforts for now. I got the control to work with our custom object by replacing all references to DataRowView with our object. I think I'm going to take a look at this later though.

Now Playing: John Reuben - Do Not

Posted by Jorriss | with no comments
Filed under:

Sometimes you hit gold after you've sold the property. I just found a survey application in .Net called NSurvey. "NSurvey is a free, open source web based survey and form engine toolkit for Microsoft's .NET." Eighteen months ago we implemented Ultimate Survey, a classic ASP surveying tool. Of course we had to modify the application to use our security model which has prevented us from upgrading the app. Ultimate Survey has worked well but I've wanted a tighter solution. It might just be that NSurvey is it.

Now Playing: Peace 586 - Here for Years

Posted by Jorriss | with no comments
Filed under:

DevConnections is currently being held in Vegas. TheServerSide.Net has posted coverage of the day one and day two of the conference. The one thing that peaked my interest was the feature list of SQL Server 2005. Pretty impressive

Posted by Jorriss | with no comments

I've been prototyping an application for work and had a slight problem. I needed to get the column position of the caret in a RichTextBox. To determine the column position I had to subtract the number of characters in the lines before the caret from the caret character position. The RichTextBox.SelecionStart property gives the caret character position so I'm halfway there. But I couldn't figure out how to compute the number of characters in the lines before the caret. The RichTextBox methods don't give that information. So after some investigation I had to go somewhere where I don't like to go, the Win32 API. So I cracked open Dan Appleman's Visual Basic Guide to the Win32 API and found out that it's still relevant in today's .Net world. I knew that I needed to use the SendMessage function but I didn't know what message to send. I found the answer on page 1362, EM_LINEINDEX. EM_LINEINDEX "determines the character offset of the first character in the specified line." In other word exactly what I was looking for. So here's the final code. I've subclassed the RichTextBox into a control that supports the GetCurrentColumn function. I now know the column position in my RichTextBox and everything is roses.

Public Class ColumnTextBox : Inherits RichTextBox

    Private Declare Function SendMessage Lib "user32" _
        Alias "SendMessageA" (ByVal hwnd As IntPtr, ByVal wMsg As Integer, _
        ByVal wParam As Integer, ByVal lParam As Long) As Integer

    Private Const EM_LINEINDEX = &HBB

    Public Function GetCurrentColumn() As Integer

        Dim lineIndex As Integer = SendMessage(Me.Handle, EM_LINEINDEX, -1, 0)
        Return Me.SelectionStart - lineIndex

    End Function

End Class

 

Now Playing: Stavesacre - At the Moment

Posted by Jorriss | with no comments
Filed under: ,

Scott Guthrie is on fire! Recently, he's posted updates on the development of ASP.Net 2.0. His first post is an enlightening look on the Microsoft development process. His second post goes in to to the intricacies of the testing process. Here's the amazing part, they track and test 105,000 test cases and 505,000 test scenarios. Simply amazing.

UPDATE: He's clarified how his team tracks bugs.

Posted by Jorriss | with no comments
Filed under: ,