Microsoft Certification Questions

Q:

You develop an inventory management application called XYZManagement that will call a Microsoft SQL Server stored procedure named sp_GetDailyXYZSales. The stored procedure will run a query that returns your daily sales total as an output parameter. This total will be displayed to users in a message box.


Your application uses a SqlCommand object to run sp_GetDailyXYZSales. You write the
following code to call sp_GetDailyXYZSales:
SqlConnection cnn = new SqlConnection(myConnString);
SqlCommand cmd = new SqlCommand(“sp_GetDaily XYZ Sales”, cnn);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter prm = cmd.Parameters.Add(“@ItemTotal”,SqlDbType.Int);
prm.Direction = ParameterDirection.Output;
cnn.Open();
cmd.ExecuteNonQuery();


Now you must write additional code to access the output parameter. Which code segment should you use?

A) MessageBox.Show(?Total is: ? + cmd.Parameters[?@Output?].Value.ToString()); B) MessageBox.Show(?Total is: ? + cmd.Parameters[?@Output?].ToString());
C) MessageBox.Show(?Total is: ? + cmd.Parameters[?@ItemTotal? D) MessageBox.Show(?Total is: ? + cmd.Parameters[?@ItemTotal?
 
Answer & Explanation Answer: C) MessageBox.Show(?Total is: ? + cmd.Parameters[?@ItemTotal?

Explanation:

The @ItemTotal parameter is declared as an output parameter with SQL Server data type INT.We use the Value property of the SQLParameter class to retrieve the value of this parameter. We must also convert the INT value to a string value with the ToString method. We then supply this string to the MessageBox.Show method. 

 

Incorrect Answers


Option A, B:
The @ItemTotal parameter is the output parameter. Using @Output this way is incorrect. Output is a keyword and no variable named @Output has been declared.


Option D:
We must use the Value method to retrieve the value of the parameter..

Report Error

View Answer Report Error Discuss

1 2497
Q:

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. You discover that when an application submits a PUT or DELETE request to the Data Services service, it receives an error. You need to ensure that the application can access the service. Which header and request type should you use in the application?

A) an X-HTTP-Method header as part of a POST request B) an X-HTTP-Method header as part of a GET request
C) an HTTP ContentType header as part of a POST request D) an HTTP ContentType header as part of a GET request
 
Answer & Explanation Answer: A) an X-HTTP-Method header as part of a POST request

Explanation:
Report Error

View Answer Report Error Discuss

6 2491
Q:

You want to configure synchronization settings for your office files. Which tool should you use?

A) Folder options B) Scheduled Tasks
C) Windows Explorer D) System Information
 
Answer & Explanation Answer: C) Windows Explorer

Explanation:

Use Windows explorer to configure a synchronization schedule for offline files. (Select Tools => Synchronize to start this process.) You can also access the same synchronization tool by selecting Start => Programs => Accessories => Synchronize.

Report Error

View Answer Report Error Discuss

0 2479
Q:

You want to create and format a simple volume on a Windows 2000 computer. Which tool should you use?

A) Disk Administrator B) Disk Management
C) The Convert.exe command -line utility D) The Format.exe command-line utility
 
Answer & Explanation Answer: B) Disk Management

Explanation:

Windows 2000 includes a powerful tool to manage disks - it's called Disk Management. You can use Disk Management to create and manage several different volume types on a Windows 2000 computer.

Report Error

View Answer Report Error Discuss

1 2479
Q:

You are upgrading your single master Windows NT Server 4.0 network to Windows 2000. Which computer should you upgrade first?

A) The stand-alone server in the Windows NT 4.0 domain that will become the root domain in your Windows 2000 network B) The primary domain controller (PDC) in the Windows NT 4.0 domain that will become a child domain in your Windows 2000 network
C) The backup domain controller (BDC) in the Windows NT 4.0 domain that will become a child domain in your Windows 2000 network D) The Primary domain controller (PDC) in the Windows NT 4.0 domain that will become the root domain in your Windows 2000 network
 
Answer & Explanation Answer: D) The Primary domain controller (PDC) in the Windows NT 4.0 domain that will become the root domain in your Windows 2000 network

Explanation:

When upgrading from a Windows NT 4.0 single master domain model to windows 2000, the first computer you should upgrade is the PDC of the Windows NT 4.0 domain that will become the root domain of your Windows 2000 network.

Report Error

View Answer Report Error Discuss

0 2450
Q:

A large document contains meeting notes from all meeting that took place between HR and Finance. You need to find all instances of 'derive' or 'dive' or 'dave'. What would be the most efficient way to find these terms using the Find & Replace dialog box?

A) Choose Wildcard option and search for d?ve B) Choose Wildcard option and search for d*ve
C) Choose Wildcard option and search for ?ve D) Choose Wildcard option and search for *ve
 
Answer & Explanation Answer: B) Choose Wildcard option and search for d*ve

Explanation:
Report Error

View Answer Report Error Discuss

5 2438
Q:

You are a developer for a XYZ Inc that provides free software over the Internet. You are developing en e-mail application that users all over the world can download.

 

The application displays text strings in the user interface. At run time, these text strings must appear in the language that is appropriate to the locale setting of the computer running the application.

 

You have resources to develop versions of the application for only four different cultures.You must ensure that your application will also be usable by people of other cultures.
How should you prepare the application for deployment?

A) Package a different assembly for each culture. B) Package a different executable file for each culture.
C) Package a main assembly for source code and the default culture. Package satellite assemblies for the other cultures. D) Package a main assembly for source code. Package satellite assemblies for each culture.
 
Answer & Explanation Answer: C) Package a main assembly for source code and the default culture. Package satellite assemblies for the other cultures.

Explanation:

When you build a project, the resource files are compiled and then embedded in satellite assemblies, or assemblies which contain only the localized resources. The fallback resources are built into the main assembly, which also contains the application code.

Report Error

View Answer Report Error Discuss

1 2397
Q:

You get a great deal on a refurbished laser printer. The printer is plug and play compliant and connects to your USB port. The printer is on the current Windows 2000 Hardware Compatibility List (HCL). You install the printer and run the manufacturers setup program. During the installation, you receive the error shown in the exhibit (See the exhibit below). What should you do?

A) Change the USB port setting to enable legacy Plug and Play detection. B) Configure the USB port to Disable Error Detection.
C) Connect the printer as a shared device on a non-Windows 2000 computer. D) Install the WDM-compliant device drivers using the Add New Hardware wizard.
 
Answer & Explanation Answer: D) Install the WDM-compliant device drivers using the Add New Hardware wizard.

Explanation:
Report Error

View Answer Report Error Discuss

0 2396