Microsoft New Excel Engine for .NET

This is a useful tip regarding the usage of Import of Excel Data to .NET.

Currently most of the applications are using the following connection string to connect to the Excel Engine.

Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & strFinalSourceLoc & strFileName & ";" & "Extended Properties=Excel 8.0;"

However Microsoft has come with a new Excel Engine called “ACE” which eliminates some of the teething bugs in the Old engine.

Here is the connection string of the same.

"Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source=" & strFinalSourceLoc & strFileName & ";" & "Extended Properties=Excel 12.0;"

Here is the place from where we can download the engine for the above connection to work.
http://www.microsoft.com/downloads/details.aspx?FamilyID=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en

Online Image Optimizer- GIF, JPG, and PNG

During Web Applicaion development often we require that our images be of optimized size to allow faster downloads of the pages,
The foll site has an online compressor and will compress the images and display them instantly
Click on the image to visit the website:- Free online tool- optimize your gifs, jpg, and png images

Urgent vs Important !

Urgent vs Important
by Chrissie Slade

Learn to distinguish "urgent" from "important".

URGENT - "requiring or compelling speedy action or attention" (NOW!) We react to urgent tasks.

IMPORTANT - "of great significance or value" (GIVES RESULTS) Important tasks require more initiative and being proactive.

Sometimes urgent things are important and sometimes they aren't. You will never have enough time for everything, so you need to decide what is really important. IMPORTANT activities are those which help you to achieve your goals. Most of us have learned to respond to urgent requests at the expense of important tasks. Ignore important tasks at your peril - they will escalate and become urgent, at which point you have yet another crisis to deal with!

In Stephen Covey's book "The Seven Habits of Highly Effective People" he categorises activities into four categories:

1) Urgent and Important
2) Not Urgent and Important
3) Urgent and Not Important
4) Not Urgent and Not Important

The highest payoffs and greatest opportunities are usually in category 2.

Stephen Covey asks: "What one thing could you do in your personal or professional life that, if you did it on a regular basis, would make a tremendous positive differencein your life?" Activities in category 2 have that kind of impact. Our effectiveness takes quantum leaps when we concentrate on category 2.

Do you find yourself responding to "urgent" items or requests more quickly than "important" ones? Start making important tasks seem more urgent by setting deadlines for them, and schedule the activities into your day. Make sure you take care of the important tasks, even if they are not urgent. When you do have to react to an "urgent request", spend some time thinking through your response. Solutions that are well thought out are usually better than impulsive reactions.

If you start spending 80% of your time working with "Not Urgent but Important" items, and only 20% of your time on the other 3 categories, your effectiveness will increase dramatically. Most people start with the quick, easy or enjoyable tasks on their task list. Think about starting with the most IMPORTANT tasks instead.

Remember, IMPORTANT activities are those which help you to achieve your goals.

Useful UserDefined Functions (UDF) : SQL

We often require commonly used user defined function in SQL
So here they are at one common place I found them useful.


For example
Determine Leap Year Function
There will be times when you will need to determine the number of days in a year. This can be the case when you need to compute for the interest of savings accounts in banks. This should be simple enough because it is either 365 days if it is not a leap year and 366 if it is a leap year. Now the problem is determining if a year is a leap year or not. Currently, there is no date function within SQL Server that determines if a year is a leap year or not.
The user-defined function below determines whether a particular date is of a leap year or not. It takes a DATETIME parameter and return a bit flag, which determines if the date is within a leap year or not. A return value of 1 means that it is a leap year while a return value of 0 means it is not a leap year.

here is the link for the entire article
http://www.sql-server-helper.com/functions/index.aspx