Sunday, August 31, 2014

How to use DATEPART() in SQL ?

For SQL Server:

SELECT [ID],[RollNo],[Name],[Address],[Telephone],AdmissionDate]
FROM [dbo].[Students]

where 
(DATEPART(DAY,AdmissionDate)= '31' ) and DATEPART(MONTH,AdmissionDate)= '08' and DATEPART(YEAR,AdmissionDate)= '2014' 

order by ID desc

How to Get SqlDataReader, OdbcDataReader, OracleDataReader in List


Step 1: Create Class

 public class Student
        {
            public string Name { get; set; }
            public int RollNo { get; set; }
            public string Address { get; set; }
            public DateTime AdmissionDate { get; set; }         
        }

Step 2: Create Function 

string conStr = ConfigurationManager.ConnectionString["StudentConnection"].ToString();

public List<Student> GetStudents()
{
 using(OdbcConnection con=new OdbcConnection(conStr))
 {
  OdbcCommand cmd = new OdbcCommand();
  cmd.CommandText = "Select * from dbo.Students;
  cmd.Connection = con;
  con.Open();
  OdbcDataReader dr=cmd.ExecuteReader();

  List<SSRSEntity> listData = new List<SSRSEntity>();
  while (dr.Read()) 
   {
//Sometimes the value is null so it throw error during conversion that's why not using the uper 3 lines of code
// object.property = datareader.if null at index 0 then assign "" empty to string

   o.Name = dr.IsDBNull(0) ? "" : (string)dr.GetValue(0);
   o.Address = dr.IsDBNull(1) ? "" : (string)dr.GetValue(1);
   o.RollNo = dr.IsDBNull(2) ? "" : (int)dr.GetValue(2);
 o.AdmissionDate =Convert.ToDateTime((string)dr["SubmitDateTime"]);
                    
  listData.Add(o);
}
  return listData;
    }     
}

How to Apply for Extension of Family Visit Visa Online ?


Now there is no need to visit Jawazat office for the extension of family visit visa. I always appreciate the steps taken by the Saudi Government to make the procedural activities online.  One of these revolutionary steps is giving access to the expatriates to apply for the extension of family visit visa online. In this article, I will be explaining in detail the online procedure to apply for extension of family visit visa online.
Conditions to Apply for Extension of Family Visit Visa Online
Welcome to Extend Visit Visa for families. This service allows Individuals who have issued visit visa to extend visit visa for their visitors subject to the following Business rules:
  1. At a time of visa extension, the Visit visa duration should be more than 7 days or have been expired before 3 days.
  2. Visit visa holder is present in KSA
  3. Fee of visa extension is paid
  4. Visit visa holder PP is valid (not expired) on the date of VV extension
  5. Visa requester / Visit visa holder Status is alive.
  6. Visit visa holder does not have unpaid Traffic violation
  7. The total Visit Visa period should not exceed the permitted period.

Procedure to Apply for Extension of Family Visit Visa Online
  1. Pay SR 100 for the extension of family visit visa through online or internet banking.
  2. In order to apply for extension of family visit visa, you must have online account on Ministry of Interior Website. If you don’t have Abshir account on Ministry of Interior Website, please follow this link to create it. “Abshir Account in Ministry of Interior Website
  3. If you have already created this account, just login to it by following this link.
  4. A new screen will be opened from which you will have to click on “E-Services” as shown in the screenshot below.
  5. On the left hand side, there will be a list from which you need to click on the “Passports” icon.
  6. A drop down list will appear and you need to click on the icon of “Extend Visit Visa”
  7. A new page will open where all the terms and conditions to apply for extension of family visit visa are mentioned. Now you need to click on the “Proceed” button.
  8. A new screen will open where you have to click on the  button "More Details" for the candidate for whom you want to extend the visit visa. (Following 3 images were shared by Rana Irfan)
  9. A new screen will be opened as soon as "more details" button is clicked. All the passport and visa details of the visa holder will be mentioned on that page as shown in the image below. You need to click on the button "Confirm to Extend Visit Visa" to confirm the extension.
  10. Last screen will be opened to congratulate you and communicate that visit visa has been successfully extended. 

Apply for Family Visit Visa in Saudi Arabia ?


Requirement for Family Visit Visa in Saudi Arabia
  1. You should have a valid original iqama
  2. Copy of Passport
  3. Copy of passport of each member of your family you want to invite for family visit visa
  4. Acceptable Profession to apply for family visit visa (See list here) Unfortunately, if profession of your visa is not listed in one of the professions listed in the list, you will have to go for change of profession.
Following Persons can be invited on Family Visit Visa   
  1. Wife
  2. Children
  3. Father
  4. Mother
  5. Sisters
  6. Father in Law
  7. Mother in Law
Step by Step Process to Apply for Family Visit Visa
Filing online application
Here we shall provide you step by step guide to apply for family visit visa in Saudi Arabia. I would suggest you to open the website on Google Chrome. The content of the application is in Arabic and you can easily translate it in English by clicking on the Translate button. Open website of Ministry of Foreign Affairs and fill the application form. Enter your name in place of name of Kafeel, since you will be Kafeel of the family members coming on visit visa. Some people make a mistake by entering the name of their employer in place of name of sponsor. You should apply for visit visa of 90 days. Keep in mind that visit visa can be extended two times for the same period for which it is applied. After fulfilling and submitting the application, take a print out of it. Application number will be appearing on the corner of the application.

Submitting the Application to Chamber of Commerce
Now sign the application and put the date on it. After this, go to your sponsor and ask him to sign and stamp the application. Make sure that the person who is signing your application is one who has authorized signatures in chamber of commerce. Now, you need to go to the chamber of commerce of the city where your employer is registered. Keep in mind, other chamber of commerce will not serve your objective.

You need to submit SR 25 fee for application of visa and submit it to the chamber of commerce. They will take copy of your application and give you another print out. Now you are done with the visa application submission.

Check Online Status of Application
Officially they say, it takes 3 days but normally it takes a week to process the visa. Even if it takes more than that, don’t worry. You are dealing with Saudi government department so you should build up some patience. Go to this link, and enter your application number and Iqama number to get the status of your application. If everything goes fine, family visa will be issued.

Submitting the Application in Saudi Embassy
If your family visa is approved, you need to send application number to the relative in your home country. It is better to contact some agent in this regard. He will charge you a little amount but your work will be eased out in your home country. Normally agents who issue Umrah visas have some contacts in Saudi Embassy and they can speed up the process of your family visa application. 

In some countries like Pakistan, Saudi Government has established Eitamad Centers. You do not need to contact agents in case Eitamad Centers are established in your native country. You directly go to them and they will process the family visit visa for you. Charges of Eitamad Center are around SR 400 per passport. They process it very fast. Sometimes, you submit documents one day and they send you SMS very next day to collect passport from their center. Process you need to carry on in Eitamad Centers is explained by one of our writer Mr. Shaneel Ahmed in thisarticleFollowing documents need to be submitted to the Saudi Embassy.
  1. Original passport
  2. Copy of your Iqama (Remember you are sponsor)
  3. Copy of your Passport
  4. 2-4 passport size photos
  5. If you want to apply for visa of your married sister, authorization letter from her husband.
  6. If you want to apply for the visa of in-laws. You need to present the marriage certificate and copy of the passport of your wife.

Once the visa is processed and stamped by the Saudi Embassy, visa holder will have to travel within 3 months, failure to do so will result in expiration of the visa.

If Some More Documents Required
In some cases, your application for family visa is not approved straight forward. They will ask you to submit the application along with some documents to the Ministry of Foreign Affairs. Now attach all the documents mentioned above with the application and submit it to the nearest office of Ministry of Foreign Affairs. You should go to MOFA office at around 11 am. This is the time when MOFA office will be least crowded. Timing of MOFA office is 7am to 2pm with Zuhr prayer break. If you will come in the early morning, you will find it very crowded. Continue the same process mentioned above for checking the online status of application. Soon, you will see good news there.

Some Deadlines to Consider
  • Once visit visa is issued, it can be stamped by Saudi Embassy in your home country within 6 months of its issuance date.
  • Once family visit visa is stamped in your home country by the Saudi Embassy, it is valid for 2 months from the date when it is stamped.

Extension of Visit Visa
  • If visit visa is stamped for 30 days, it can be extended 6 more times. It means total stay in the Kingdom of Saudi Arabia will be of 210 days in this case.
  • If visit visa is initially issued for 90 days, it can be extended 2 more times. It means total stay in Saudi Arabia will be of 270 days. 
  • We have published a detailed article about the process of extending the family visit visa in this article.
  • Visit visa can be extended online as well. We have explained the process of extending the visit visa onlinein this article.


Do Not OVERSTAY

It is very important to mention here that expat living in Saudi Arabia on Iqama takes the responsibility of the family members entering to the Kingdom. In case of Overstay of any family member, even if the stay is of a single day, SR 25,000/- fine is imposed on the expatriate with Iqama. In fact, you should plan the departure 3,4 days before expiry of the visa date. You never know, due to flight problem you may have to stay at airport or some other bad thing may happen to you. You can read about this topic in detail in this article, "What to do if Family Visit Visa Expires"

Apply for Permanent Family Visa ?


A very simple guide to Apply Permanent Family Visa for KSA,


Only These Iqama Professionals can apply for Family Visa. if your profession is not under the list please attest your degree to change your Profession.


Process In Native Country (1):

Step 0:
Attest your Iqama and Passport copy from your company and send to Islamabad Saudi Culture by Mail (DHL, ARAMIX ) e.t.c. 

Step 1:
Saudi Culture now have your Iqama/Passport Copy send by you/your company with attestation,

Now one of your family member will go to the Saudi Culture Islamabad Pakistan with below mentioned documents,

1) Degree attested by "HEC" and "Ministry of foreign affairs Pakistan".
2)  2 Letters from your (Company in Saudi Arabia) attested by chamber of commerce and ministry of foreign affairs(MOFA)  Saudi Arabia.
3) Copy of your Iqama and copy of Passport Visa page and Photo page.


Step 2:    
Original Marriage Certificate & Original Children Birth Certificate attest it from Ministry of Foreign Affairs in your country. Then attest Step2 documents from Saudi Embassy




Process In Saudi Arabia:

Now, I assume that you have all these documents in your hand in Saudi Arabia. It means Iqama profession is suitable, you have your attested degrees, attested marriage certificate and attested birth certificates of children along with attested Arabic translated copies. 

Step 1:
Take all documents to Ministry of Foreign Affairs and stamp all documents otherwise Jawazat will not accept it.

 Step 2:
You need to take a letter from your sponsor directed to Jawazat requesting from them to process visa for your family. This letter should be stamped by the Chamber of Commerce.

Step 3:
You need to submit visa fee of SR 2,000/- per family through SADAD. Try to pay this fee from your internet or phone banking. It is always preferable to pay it from your personal bank account.

Step 4:
Now you need to ask from Government Relations Officer of your company about the Jawazat Office you need to visit. There are several Jawazat offices in big cities. If you are living in Jeddah, you need to go to Istaqdam Jawazat Office situated in Rehab District.

Step 5:
You need to submit attested degrees along with translation, attested marriage certificate, and attested birth certificates of all your children, copies of passports of all the people applying for the visa, copy of the Iqama and letter from the sponsor stamped by Chamber of Commerce.

Step 6:
Take copies of all the original documents and submit them to the window at your turn. Whenever there are some attested documents, make sure you have taken copy of main document as well as attested stamps. He will check the documents and will ask you to wait for a while. After around 30 minutes, you will be called again at the window and if everything goes fine, you will be given a yellow slip. This yellow slip is actually visa for your family. Take the slip and check if the names and other details mentioned on the yellow slip are the same as mentioned on the passport and other formal documents.

Process In Native Country After Getting Visa (2):


Step 1:
Now, you need to send this Yellow slip to your native country to your family. It is always advisable to take services of some agent in this regard. Overseas employment agents are expert in these kinds of processes and they have relations inside Saudi Embassy. It is easier for them to get it stamped. They will charge you from SR 400 to SR 500 per passport and take care of all the requirements.

Step 2:
In some countries like Pakistan, Saudi Government has established Eitamad Centers. You do not need to contact agents in case Eitamad Centers are established in your native country. You directly go to them with the report of medical test. They will process the permanent family visa for you. Charges of Eitamad Center are also same as mentioned above. Process you need to carry on in Eitamad Centers.

Step 3:
All your family members will have to go throughmedical test before apply for visa to Saudi Embassy. Agent will give a token for every family member and they will have to appear for the test in designated laboratories. If you have Eitmad centers in your country, there is no need to take token. You can directly go to the approved laboratory for test. The report of the test is required to be submitted to Saudi Embassy to stamp the Visa.




List Of Profession IQAMA Who can apply for Permanent Family Visa for Saudi Arabia?


List of Professions

1.                   Accountant / Accounts Verifier / Auditor
2.                   Accounts Manager
3.                   Administration Coordinator
4.                    Administrative Manager
5.                   Administrative Researcher
6.                   Agricultural specialist (General)
7.                   Air Controller
8.                    Air Hostess
9.                    Air Navigator
10.                Air Transport Manager
11.                Aircraft Landing Controller
12.                Aircraft Maintenance Technician
13.                Aircraft Takeoff Controller
14.                Aquatic Specialist
15.                Archeological Director
16.                Archeological Prospector
17.                Archeological Researcher
18.                Architectural Draftsman
19.                Army Officer
20.                Artist (Actor, Musician, Composer, Poet, Painter, Singer…..etc)
21.                Assistant Engineer (All specializations)
22.                Assistant General Manager
23.                Assistant Pharmacist
24.                Assistant Pilot
25.                Astronomer
26.                Auditor
27.                Author
28.                Aviation Guide
29.                Aviation Technician
30.                Aviation Trainer
31.                Bank Manager
32.                Bank Official
33.                Banker
34.                Banking Business Manager
35.                Breeding Specialist (Animals/ Birds/ Bees)
36.                Broadcasting Manager
37.                Business lady
38.                Businessman
39.                Captain of Ship/Cruise/Carrier/Steamship
40.                Career Counselor
41.                Chairman (All types)
42.                Chairman / Executive Director
43.                Chemist (All Specializations)
44.                Chief Justice
45.                Cinema Cameraman
46.                Cinema Director
47.                Cinema or Television Producer
48.                College Dean
49.                Commercial Broker
50.                Commercial Manager 
51.                companies
52.                Company or Factory Manager
53.                Computer Programmer
54.                Consultant (All types)
55.                Consultant (All types)
56.                Control Equipments Technician
57.                Cooperative Society Manager
58.                Correspondent (Newspaper/Radio/TV)
59.                Cruise Ship Guide
60.                Customs Clearer
61.                Customs Specialist
62.                Decoration Designer
63.                Dental Technician (Fixing)
64.                Diplomat (Members of diplomatic corps)
65.                Director
66.                Earthquakes expert
67.                ECG Technician
68.                Economic Analyst
69.                Electricity Manager
70.                Employees at the Embassies in the GCC countries (Except
71.                Engineer (All specializations)
72.                Executive Manager or Director
73.                Executive Secretary
74.                Farm Manager
75.                Finance Manager
76.                Finance/Economics Expert
77.                Flight Technician
78.                Food Controller
79.                Foodstuff Technician
80.                Gardening Specialist
81.                General Professional Trainer
82.                General Specialist
83.                General Supervisor
84.                Geologist (General)
85.                Geology Technician
86.                Head of Prosecution
87.                Horse Breeding Technician
88.                Hospital Manager
89.                Hotel Manager
90.                Information Systems Expert
91.                Institute Manager
92.                Insurance Manager
93.                Investment Manager
94.                Investor
95.                Jeweler
96.                Journalist
97.                Judge
98.                Lab Specialist
99.                Lab Technician
100.            Laboratory Manager 
101.            Land Hostess
102.            Land Transport Manager
103.            Lawyer / Advocate
104.            Lecturer
105.            Legal Expert
106.            Legal Researcher
107.            Library Manager
108.            Literator
109.            Maintenance Manager
110.            Male or Female Nurse
111.            Manager (All types)
112.            Manager or Director of any government departments or
113.            Marine Navigator
114.            Marine Traffic Controller
115.            Marine Transport Manager
116.            Maritime Controller
117.            Marketing Executive
118.            Marketing Manager
119.            Marketing Representative
120.            Media Controller
121.            Media Manager
122.            Media Person
123.            Media Specialist
124.            Medical Analysis Specialist
125.            Medical Equipments Technician
126.            Medical Therapy Specialist
127.            Medical X-ray Specialist
128.            Microscopic Technician
129.            Mining Technician
130.            Ministry Undersecretary
131.            Museum Manager
132.            Nutrition Specialist
133.            Operations Analyst
134.            Optical Technician
135.            Partner
136.            Pharmaceutical Technician
137.            Pharmacist
138.            Physician (All specializations)
139.            Physicist
140.            Pilot
141.            Player (All sports items in a sports club)
143.            President or Director of a Club
144.            President or Director of a University
145.            Press Photographer
146.            Printing and Publishing Manager
147.            Procurement Representative
148.            Production Director
149.            Professional Security and Safety Technician
150.            Professor
151.            Program Designer
152.            Program Producer
153.            Proofreader
154.            Prosecutor
155.            Psychiatrist
156.            Quality Controller
157.            Quantity Enumerator
158.            Radio or TV Transmission Technician
159.            Referee (sports)
160.            Regional Director
161.            Religious person
162.            Research & Studies Director
163.            Road Controller
164.            Sales Executive
165.            Sales Manager
166.            Sales Representative
167.            School Manager
168.            Scientist
169.            Secretary or Manager of Library
170.            Ship Captain
171.            Ship Maintenance Technician
172.            Ship Supervisor
173.            Sociologist
174.            Special Needs Teacher
175.            Speech Specialist
176.            Sports Medicine Specialist
177.            Sports Representative
178.            Sports Trainer
179.            Statistics Specialist
180.            Support Services Jobs)
181.            Surgeon (All specializations)
182.            Surveyor
183.            Systems Analyst
184.            Teacher / Instructor
185.            Telecom Technician
186.            Television Manager
187.            Theatre Manager
188.            Tourism Agency Manager
189.            Tourist Guide
190.            Trader
191.            Train Maintenance Technician
192.            Translator
193.            Travel or Tourism Agent
194.            TV Cameraman
195.            TV or Radio Programs Presenter
196.            University Professor
197.            University student
198.            Veterinary Doctor
199.            Weather expert
200.            Well Drilling Technician
201.            X-Ray Specialist
202.            X-ray Technician
203.            Zoology Specialist

Secure you Asp .NET by Web.config & Global.ascx?

Add to Global.ascx protected void Application_BeginRequest(object sender,EventArgs e)     {         //to remove x frame         Resp...