You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application that will connect to the Microsoft SQL Server 2005 database. You then define the connection string of the application as follows: "Server=Prod;Database=WingtipToys;Integrated Security=SSPI;Asynchronous Processing=true" The following code segment is used on the application: (Line numbers are included for reference only.) 01 protected void UpdateData(SqlCommand cmd) { 02 cmd.Connection.Open(); 03 04 lblResult.Text = "Updating ..."; 05 } You discover that the cmd object takes a long time to execute. You want to make sure that the application continues to execute while cmd is executing. What should you do?()
You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application that will connect to the Microsoft SQL Server 2005 database. The application uses an XML file that contains product data. Furthermore, a corresponding XSD file contains the schema of the XML file. You want the application to do the following: Loads the XML file in a typed DataSet and validates it against the schema provided in the XSD file. What should you do? ()
You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application that will connect to the Microsoft SQL Server 2005 database. Your application contains the following code. string queryString = "Select * from dbo.Users"; SqlCommand command = new SqlCommand(queryString, (SqlConnection)connection)); You want to get the value that is contained in the first column of the first row of the result set returned by the query. What should you do? ()
You network contains two domains named contoso.com and nwtraders.com. A single DNS server hosts both DNS zones. The DNS server has an IP address of 10. 10. 0. 10. You have 100 computers that run Windows XP Professional. The computers are members of the contoso.com domain. All computers have static IP addresses. The network does not contain a WINS server. You need to ensure that users can access servers in both domains by using single-label host names. What should you do on the client computers?()
You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application that will connect to the Microsoft SQL Server 2005 database. The application fills a DataSet object named cust with customer records. Your application contains the following code. (Line numbers are for reference only.) 01 System.IO.StreamWriter sw = 02 new System.IO.StreamWriter("Customers.xml"); 04 sw.Close(); You want to write the content of the cust object to the Customers.xml file as XML data along with inline XML schema. What should you do?()
You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application. The user name and password that is kept by the connection string is stored directly in the code of the application. You want to make sure that the password in the connection string is as protected. What should you do? ()
You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application that will connect to the Microsoft SQL Server 2005 database. You want to use Windows Authentication along with the Microsoft OLE DB provider. You now need to make sure that the OLE DB connection is as secure as possible. What should you do?()
You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application that will connect to the Microsoft SQL Server 2005 database. You application has a DataTable named CustActions, which has the following structure as seen in the exhibit. Your application contains the following code. (Line numbers are included for reference only.) 01 DataColumn AccountSuspendedColumn = new DataColumn(); 02 AccountSuspendedColumn.DataType = typeof(Boolean); 03 AccountSuspendedColumn.ColumnName = "AccountSuspended"; 04 CustActions.Columns.Add(AccountSuspendedColumn); You want to make sure that the values in the AccountSuspendedColumn column are set to True, with the following conditions: 1. The value contained in the LatePaymentsCount column is greater than 10. 2. The value contained in the OverrideCode column is equal to "EXEMPT". What should you do?()
You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application. You want to make sure that the application is operative to any type of database. What should you do?()
You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application. You have completed the following code segment. (Line numbers are for reference only.) 01 private void GetRecords(SqlDataAdapter da, DataTable table) { 02 03 try { 04 da.Fill(table); 05 } 06 catch (SqlException exp) { 08 } 09 finally { 10 11 } 12 } 13 You have set the da.SelectCommand.CommandText property to a stored procedure, which declares a variable named @msg. If the stored procedure has a bad shipping address, it will do the following: 1. sets @msg with the id of the record. 2. raises an error for the record. The raised error can be seen in the following text: RaiseError(@msg, 10, 1). You want to retrieve all records, valid or not; and that a list item is added to the lstResults list box for each invalid record. What should you do?()