多项选择题
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 connection string that is defined as follows:
"Server=DB01;Database=Products Security=SSPI; Asynchronous Processing=true"
Your application contains the following code. (Line numbers are for reference only.)
01 protected void UpdateData(SqlCommand cmd)
02 {
03 cmd.Connection.Open();
04
05 lblResult.Text = "Updating ...";
06 }
The cmd object takes forever to execute. You want to make sure that the application continues to execute while cmd is executing.
What should you do?()
A.A
B.B
C.C
D.D
E.E
F.F
相关考题
-
单项选择题
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 application of Contoso.com has a TextBox control named ProdID which will return a list of active products that have the ProductID field equal to the ProdID.Text property. Your application contains the following code. (Line numbers are for reference only.) 01 private DataSet GetProducts(SqlConnection cn) { 02 SqlCommand cmd = new SqlCommand(); 03 cmd.Connection = cn; 04 SqlDataAdapter da = new SqlDataAdapter(cmd); 05 DataSet ds = new DataSet(); 06 07 da.Fill(ds); 08 return ds; 09 } You need to populate the DataSet object with product records and at the same time to avoiding possible SQL injection attacks. What should you do?()
A.A
B.B
C.C
D.D -
单项选择题
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 have completed the following code segment. (Line numbers are for reference only.) 01 public IDataReader GetCustomerReader() 02 { 03 SqlConnection con = new SqlConnection(); 04 //Set up the connection 05 con.Open(); 06 string sql = "Select * from Customers"; 07 IDataReader rd = null; 08 09 con.Close(); 10 return rd; 11 } You need to make sure that a DataReader stream for the data in the Customers table can be returned from the GetCustomerReader method. What should you do? ()
A.A
B.B
C.C
D.D -
单项选择题
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?()
A.A
B.B
C.C
D.D
