Monthly Archives: April 2013

Add the server variable name to the allowed server variable list.

In IIS you can add Server variable to the server variable list in the following steps.

  1. Go to IIS
  2. Select the site node for which you want to add variable
  3. double click URL Rewrite under IIS on the right hand side. If you do not see it you may want to install it from Microsoft site.
  4. On the right column, select “View Server Variables”.
  5. If you have any variables you will see it, if you don’t and want to add one, select Add button in the top right column
  6. Type name name of the variable in the popup dialog and you are all set.


Running query against remote server

If you want to run a SQL Query against a remote server for example a different machine on the same network, you may want to use the flowing code. First link the server, then use OPENQUERY to run the query against the linked server. The two sql commands do not need to be executed in one batch. Example

Computer Name : MY-PC
Remote Server Name: SQLExpress1
Present Server Name: SQLExpress2

Example 2 – Remote Query

Do not forget single quotes around the query
Do not forget “Select * from” before OpenQuery statement.

Emirates outrageous baggage fees

It looks like the airline industry is run by cowboys, there are no rules and regulations, esp if you are going on international flight via multiple airlines. And esp if you got your ticket via online purchase.

It recently happened to a family member. We got an online ticket from USA to Pakistan which allowed one bag. So we did carry two bags with us, knowing that we will pay for the second bag because we had lots of luggage. But surprise surprise, they did not charge us for the second bag. They did not even ask that we have to pay for the second. In fact the airlines (American Ailines) was nice enough to check in her 2nd bag free of charge, because they said they have lots of luggage and will provide free checkin for 3rd bag. That is after my wife went through the security and before boarding. We were all happy that things worked out really well. But things would change when my wife would reach Dubai.

Everything was fine during the flight New York to London (American Airlines) and London to Dubai (American Airlines operated by British Airways) but thing would change in Dubai. Dubai official demanded that my wife pay for 2 extra bags, since the American Airlines allowed her two checkins and provided one free checkin (to everyone). This was outrageous. They were asking for close $250 for the two extra bags but my wife was not ready to pay it all. After a lot of arguments, the plane waiting for her to board, they allowed the small carry one bag that was checkin free and agreed that my wife will pay for only one bag. She ended up paying $192 for just one bag from Dubai to Islamabad. This is absolutely outrageous. This is more than the charging a passenger with one one full bag. See the attached search

Screen Shot 2013-04-21 at 7.47.50 AM




Now this is ridiculous that one airlines will allow you a bag and then next one would charge you for the same bag. There are no rule what so ever. Earlier I inquired about the policy in such case when you have international flight and flying through different carriers. There are two rules that apply

  1. Which ever one is the major carrier, its rule and baggage allowance will apply across the entire flight.
  2. The baggage allowance of the originating flight will apply across the entire flight.

In our case, our major flight was from New York to London and then from London to Dubai. The baggage allownce of those flights were not entertained in our small and last flight.

The original flight rule was not applied where we are allowed two bags.

It seems like the airlines industry is run by cow boys, there are not rules.

My Inquery into the case

I contacted the emirates official as well as American Airlines official to discuss the outrageous baggage fee by Emirates. You will be surprised to know what they had to say

1. I asked Emirates Airlines,why did they charge my wife $192 for a bag when the previous flight (one one ticket) allowed two bags for her. They said, Emirates airlines have a policy of one 30KG bag for that flight. There we had to charge that fee regardless of what the previous flight did. Every flight had its own rule. Interesting.

2. I asked American Airlines, why did they allow two bags when she was suppose to carry only one? I don’t remember what they said but it seems like some they can let it go for free. I did bring up, my wife does not have to pay if it was the Airlines mistake.

3. I asked American Airlines, how much would it cost us if the American Airlines would have charged us for the second bag and where will this money go since it is through different carrier. The operator put me on hold and after inquiring, he said, the money would go to all the carriers and the fee that we had to pay would be $150. That is less than $192 that we paid at Dubai.

I am simply out of words to explain this scenario. I think the Airlines Industry has not rules what so ever and charging passenger unreasonable fee for baggage is one way to raise revenue. Since most of them are fairly well off and most of them have international flight, that sounds like a plan to me!

You are viewing the content on this page in Preview Mode. Sign In to your Personal Account OR Start using Safari as an Academic or Library user to access the full content of this book.

I was getting this error when reading books online via local library website. The problem seemed to the Apple Safari Browser. I would get the same message over and over. When I opened the site in Google Chrome, the error disappear. I was able to reach the entire book. Hope it helps.

Download NorthWind Database 2012

There are three easy steps to download and install Northwind Database for SQL Server 2012 or any other version.

1. Download Northwind Database from codeplex

2. Restore the database in SQL Server Management studio.

The file that you just downloaded is .bak file (stored inside the zip file). Unzip the zipped file first and copy it to C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Backup. You can restore it from there. Sql Server 2012 may not restore it from any other location. If you run into any other problem, please comment below.

How to restore SQL Database

Fire up SQL Server Management studio, connect to your server.
Go to databases node of left side, right click on it, select restore database.
In the dialog select “Device”, click on “…” button and select the file. When you select the .bak file, it will appear in the bottom area. Make sure you check the checkbox.
Click OK. You are done. Refresh the database list and you should see the Northwind database.

search for end of line

Sometime you want to add comma (,) at the end of line where you have hundred of line. Or you may want to add or replace anything at the end. You may want to use $ symbol to find end of line.

$ = last character in the matching string in a line

To do that, you must select regular expression check box for search criteria. Since of end of line characters are not visible, you will not see anything highlighted but if you choose to replace, you will see that it replaced the string at the end of the line.

online timesheet

I was searching for free online time sheets but could not find a good one. The following is a reasonable free online timesheet that does the job pretty well. It is somewhat buggy but otherwise does the job very well. The nice features that I like is, it creates PDF copy of your weekly timesheet  that your supervisor can sign so you do not have to do anything. It does all the calculations for you as well as create a printable copy, which is nice. Hope this helps.