Friday, November 6, 2009

No history entries were found for the item and version combination specified

This is a message when I tried to view the history of a folder on TFS.

I googled the message and only a few exact matches came out. First two was useless. I was terrified for an instance, but this blog entry saved me :

http://team-foundation-server.blogspot.com/2007/07/no-history-entries-were-found-for-item.html

The problem was that I had no permissions on the folder although I was an administrator. I could never remember to check the securities.

When I checked it I saw that the folder was not inheriting permissions. After inheriting permissions I could view the history of the folder.

Wednesday, November 4, 2009

Migrating from VSS to TFS

Beware!!! This is not a technical article about how to migrate VSS to TFS.
This is a story about my experience of migrating to TFS.

When we first met with TFS we were using Visual Source Safe 6.0.

Advisors from Microsoft came and introduced the brand new source version control system of Mirosoft, TFS. Future of the source version controls was TFS. Moreover TFS was not just another source version control system. We could even use TFS to manage projects instead of our own project management system. It also had the shelve option when you are leaving work at night. TFS brought everything we needed. They urged us to migrate to TFS because Microsoft itself was migrating to TFS. Because it was newer and better, we should quit VSS and use TFS instead.

Tuesday, November 3, 2009

Get Database Schema

If you want to list the tables of a database and columns of a table you may use the "GetSchema" method of System.Data.Common.DbConnection class.
It works on both MS Sql Server 200 and 2005. I did not try on other servers.

Sample Code

DbConnection con = new OleDbConnection(connetionString);
DataTable tables =
con.GetSchema("TABLES", new string[] {null, null, null, "BASE TABLE" });
DataTable columns =
con.GetSchema("COLUMNS", new string[] {"CustomerTable", null, null });