Sriram's WebLog Microsoft solution specialist on web platform, Columbus Ohio

Sriram's WebLog Microsoft solution specialist on web platform, Columbus Ohio

April 2004 - Posts

Failed to enable constraints

I faced the same problem like others. When you use strongly typed datasets, while loading the data, I enable the constraints and while doing that,it throws me this error.

“Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints”

Ok I understand that there are one or more columns has null values which conflicts the constraints. But I have 20 different tables and each table has 25 different columns and of which 10 or more are “Not null” columns. See where I am going? Like Drew mentioned why don't this ConstraintException  gives me little more useful information such as which table and column name.

I needed to go through all the tables and check whether “haserrors” property was set to True and if so check all the “Not null” columns. sigh!  Don't know any other better ways..

Got my Gmail account

I signed up my Gmail account today and did the test run. Overall I liked it and here is my findings.

  • It was really fast and I like the way the "Reply" works without posting back.
  • Shortcut is a godsend 'o' for Open 'c' for Compose
  • Could not figure out anything from the “View Source“ though the head frame says that I do not have my JavaScript enabled which is not true as my JavaScript is always enabled.
  • Timestamp - shows when the mail was received as well as how long back it was received.
  • dormant accounts policy - Your Gmail account will be deleted and your userid will be recycled if you do not log into the account for 9 months. I am not sure whether account will be recycled for other free web-based email services.
  • Initially I do not understand what they mean by “Labels“ until I read their help section. Label is nothing but folder but unlike folder with other web-based email services, one particular email can exists in more than one folder.
  • Looks like Gmail supports only IE 5 and above.

 

How to Pick a Project Team

Read this article in ComputerWorld. According to the author,

  • A great project team requires more than technical skills. It takes the right mix of "soft" skills, personalities and attitudes to gel and achieve results.
  • If you have to choose between specific skills and attitude, go for attitude.
  • The riskier the project, the more diversity you need in the team.
  • Don't settle with the first idea without exploring the alternatives.
  • It's helpful if team members have worked together before because it requires energy and time to build a good team.

The ideal project team should have

  1. The Architect: who knows how things could be done and never stops with the first solution.
  2. The Facilitator: who helps the team get to closure. Works closely with Architect.
  3. The Devil's Advocate: the troublemaker,the questioner;forces the group to defend its direction.
  4. The Bid-Idea Guy: who comes with “out there“ solution.
  5. The Anchor: who knows what will and won't work and what can and can't get through the bureaucracy.
  6. The People Guy: who understands how typical users behave and provides reality checks for the team.

 

Amazon's a9 search engine

Guess what. Amazon has released their search engine beta verison. It is called a9(which reminds me with Microsoft's new weblog portal channel9.com). Here are the seven reason to use a9.com(according to Amazon.com)

1.Search Inside the Book
2.Adjustable Columns
3.URL Short Cuts
4.Search History
5.Click History
6.Site Info
7.Web Search(provided by Google)

As expected, they also have toolbar. I like the "Search History","Search inside the book"  features. Slashdot article describes like this

"What makes this particularly noteworthy is that A9 is built quite literally on top of Google. In short, Amazon has taken the best of Google, and made it, to my mind, a lot better. Sound familiar? Yup, it's what Google did to Yahoo, Yahoo to Netscape...you get the picture."

Datatable Select Method

 I always use .NET SDK documentation whenever I need any help on syntax/concepts. Today I thought about this weired requirement. Suppose if I want to know the method name of any ADO.NET object which returns a DataTable, what is the easiest way to get the information?

Why do we have only two overloaded versions of DataTable.Select method

public DataRow[] Select(string);
public DataRow[] Select(string, string, DataViewRowState);

Why not another overloaded version which returns DataTable itself like this

public DataTable Select(string, string);

Because when you want to sort the filtered rows after the select method, you need to load those datarows into one table and create a view and then sort(sigh!). If we had another overloaded version of select which returns just DataTable, we can directly create the dataview and filter instead of loading.


 

Link building

Recently happened to read this “10 steps to getting links to your site” from Microsoft site. It is an interesting article which talks about “Link building” and “link popularity” which is basically Google's Page Ranking mechanism. As it is explained “Google interprets a link from page A to page B as a vote, by page A, for page B”.

Gavin Joyce wrote about this Weblog google searches  and here is mine with two words.

webforms windowsforms

Interestingly, I also found Cell phone etiquette 10 dos and don'ts article from Microsoft

Appupdater with third party components

We have been using the Appupdater for our windows application deployment. We also using Componentone's datagrid controls for our development. Yesterday we downloaded the latest Componentone's  release for our development team and everything was working til we wanted to use the Appupdater to deploy our new version into test server. The application started crashing as it could not find the new componenetone's dll files.

lesson leaned:

when you use any third-party components and upgrades their latest patches/downloads, the new dlls are put in GAC and when you use the Appupdater, it will consider only your application directory(as Appupdater is essentially XCOPYing) and so your new version dlls will not be copied to your user's PCs. Only setup project can help you to install the new dll files into user's PC's GAC as it is a major upgrade as far as deployment is considered.

Daylight saving - Spring Forward, Fall Back

Read this article in Wired on the practical difficulties of changing the clock for daylight saving. Though many of the clocks and watches do the sync with WWVB, still there are many devices do not do this sync themselves which makes life difficult in certain situations.

According to About.com,

Reason for Daylight Saving Time:

  • To make better use of daylight.
  • Conserve energy
  • Saves lives because people travel home in the light which is safer.
  • Can prevent crime because people do their errands in the daylight which is safer.
  • Contrary to popular belief, it was not created for farmers nor does it benefit farmers.

 

WebForms Vs WindowsForms

Everybody knows that Microsoft is maintaining the ASP.NET site as an official asp.net web site and windowsforms.net as an official windows forms web site. But I was surprised to see the statistics of their forums.

ASP.NET (as of 04/03/2004 8:46 am)

413,687 users have contributed to 141,522 threads and 519,521 posts.

WindowsForms.net (as of 04/03/2004 8:46 am)

4,466 users have contributed to 4,510 threads and 13,458 posts.

I wonder why there is much less participation from windowsforms developers side.

Possible reasons could be

a) Majority of the development is moving towards to web and everybody wants know more about asp.net

b)Windows developers know enough and comfortable about their knowledge and so they don't have any questions to ask!!

c)Word of mouth about windowsforms.net site is not getting passed and so it is less popular and many developers do not know that this site exists.

what you guys think?

More Posts