Cbt Nuggets Mcts 70-536 70-528
- Saturday, June 21, 2008, 5:20
- Study Guide
- 2,292 views
- 3 comments
CBT Nuggets
MCTS: .NET 2.0 Web Applications Certification Package
Contains training for .NET 2.0 exams 70-536 & 70-528
QUESTION1
You work as the Web developer at Certkiller .com. You develop a new ASP.NET application named
Certkiller App03. Certkiller App03 includes a page that is used by the Sales department employees to
change the prices of products and services offered by Certkiller .com. The code you configure uses the
System.Data namespace.
Your application works by retrieving product numbers and names, and prices from a database. All of
this information is available on the Web page, and is contained within a DataSet object named
productInfo. All Sales employees update product prices. All modifications are saved to productInfo
when the Save button is clicked.
You developed code in the Click event handler for the Save button to store changed prices to the
database, and now want to retrieve the changed rows in productInfo before performing the update.
To accomplish this, you configure an additional DataSet object named productChanges to store all
changed product information.
You must move the edited rows from productInfo into productChanges. Choose the line of code which
you should use.
A. productChanges = _productInfo.GetChanges(DataRowState.Detached)
B. productChanges = productInfo.GetChanges()
C. productChanges.Merge(productInfo, true)
D. productChanges.Merge(productInfo, false)
Answer: B
Explanation: The DataSet.GetChanges method gets a copy of the DataSet containing all changes made to it
Actualtests.org – The Power of Knowing
since it was last loaded, or since AcceptChanges was called.
Reference: .NET Framework Class Library, DataSet.GetChanges Method [Visual Basic]
Incorrect Answers
A: The DataRowState is not relevant since we have not created any DataRows in this scenario.
C, D: We only want to extract the changes rows from the DataSet, not merge the two DataSet.
QUESTION 2
You work as the Web developer at Certkiller .com. You develop a new ASP.NET page. Your page
displays information to users via a DataGrid control. Users are able to update the information
contained within the grid. The code you configure uses the System.Data namespace and the
System.Data.OleDb namespace.
Currently, data updates made up users are saved in an ADO.NET DataTable object. You create a
procedure that will save all user modifications to a database after the updates are made:
Public Shared Sub Update CertK Data(_
ByVal sql As String,_
ByVal connectionString As String,_
ByVal dataTable As DataTable)
Dim da As New OleDb.OleDbDataAdapter()
Dim cnn As New OleDb.OleDbConnection(_
connectionString)
dataTable.AcceptChanges()
da.UpdateCommand.CommandText = sql
da.UpdateCommand.Connection = cnn
da.Update(dataTable)
da.Dispose()
End Sub
After implementing the procedure, you discover that after the code executes, no update data is saved
to the database. You verify that both the update query and the connection string that you are passing
to the procedure is functioning as expected.
What changes should you make to your code so that all user data updates are added to the database?
A. Include these lines of code before calling the Update method:
Dim cb As New OleDb.OleDbCommandBuilder(da)
cd.GetUpdateCommand()
B. Include this lines of code before calling the Update method:
da.UpdateCommand.Connection.Open()
C. Remove the following line of code:
dataTable.AcceptChanges()
D. Remove the following line of code:
da.Dispose()
Answer: C
Explanation: The DataTable.AcceptChanges method commits all the changes made to this table since the
last time AcceptChanges was called. We should only use AcceptChanges after the updates has been made to
the dataset.
Actualtests.org – The Power of Knowing
Reference: .NET Framework Class Library, DataTable.AcceptChanges Method [Visual Basic]
Incorrect Answers
A: The OleDbCommandBuilder provides a means of automatically generating single-table commands
used to reconcile changes made to a DataSet with the associated database. It is not useful here.
B: The OleDbConnection.Open method opens a database connection with the property settings
specified by the ConnectionString.
D: The DataAdapter.Dispose method Releases the resources used by the DataAdapter. It is a good
practice to use it when the dataadapter no longer will be used.
QUESTION 3
You work as the Web developer at Certkiller .com. You are writing code for an ASP.NET application
named Certkiller 06. Certkiller 06 will be used for booking flights to various destinations for Sales
employees. A Microsoft SQL Server 2000 database is used to hold information on all destinations.
You configure Certkiller 06 so that users can request information on various destinations. You must
ensure that users can view the data in a DataGrid control, and in read-only form. The destinations
specified by the user are stored in a form-level string variable named destinationCode. You create a
SqlConnection object named SqlConnection1 in the Page.Load event handler. You initialize
SqlConnection1 and then call its Open() method.
You define a local variable to store the destination code:
Dim dest As String = destinationCode
You want the data to be retrieved as quickly as possible. What should you do next?
A. Create a stored procedure named GetDestinations. Use this code to return the data:
Dim cmd As SqlCommand = _
New SqlCommand(“GetDestinations”, _
sqlConnection1)
cmd.CommandType = CommandType.StoredProcedure
Dim parm As SqlParameter = _
New SqlParameter(“@DestinationCode”, dest)
cmd.Parameters.Add(parm)
dim sqlDataReader1 As SqlDataReader = _
cmd.ExecuteReader()
B. Create a stored procedure named GetDestinations. Implement this code to return the data:
Dim qry As String = _
“EXEC GetDestinations WHERE DestID = ” _
& “‘” & dest & “‘”
Dim da As SqlDataAdapter = _
New SqlDataAdapter (qry, sqlConnection1)
Dim ds As DataSet = New DataSet()
da.Fill(ds)
C. Implement this code to return the data:
Dim qry As String = _
“SELECT * FROM Destinations WHERE DestID = ” _
& “‘” & dest & “‘”
Dim cmd As SqlCommand = _
New SqlCommand(qry, sqlConnection1)
Actualtests.org – The Power of Knowing
cmd.CommandType = CommandType.Text
Dim sqlDataReader1 As SqlDataReader = _
cmd.ExecuteReader()
D. Implement this code to return the data:
Dim qry As String = _
“SELECT” * FROM Products WHERE DestID = @DestID”
Dim cmd As SqlCommand = _
New SqlCommand(qry, sqlConnection1)
cmd.CommandType = CommandType.Text
Dim parm As SqlParameter = _
New SqlParameter(“@DestID”, dest=
cmd.Parameters.Add(parm)
Dim SqlDataReader1 As SqlDataReader = _
cmd.ExecuteReader()
Answer: A
Explanation:
Creating a stored procedure and calling it with a SqlCommand object, SqlParameter object, and an
SqlDataReader would be the fastest way to access this data.
Incorrect Answers:
B, C, D: Creating a query string in code would work, but is not the fastest way to
MCTS – 70-536
http://rapidshare.com/files/51309438/NU-70-536_.part01.rar
http://rapidshare.com/files/51309456/NU-70-536_.part02.rar
http://rapidshare.com/files/51309479/NU-70-536_.part03.rar
http://rapidshare.com/files/51309493/NU-70-536_.part04.rar
http://rapidshare.com/files/51309516/NU-70-536_.part05.rar
http://rapidshare.com/files/51309538/NU-70-536_.part06.rar
http://rapidshare.com/files/51309565/NU-70-536_.part07.rar
http://rapidshare.com/files/51309583/NU-70-536_.part08.rar
http://rapidshare.com/files/51309599/NU-70-536_.part09.rar
http://rapidshare.com/files/51309616/NU-70-536_.part10.rar
http://rapidshare.com/files/51309414/NU-70-536_.part11.rar
MCTS – 70-528
rapidshare.com/files/107045854/CN.Pack.70.528.Net.2.0.pm.part1.rar
rapidshare.com/files/107145425/CN.Pack.70.528.Net.2.0.pm.part2.rar
rapidshare.com/files/107187189/CN.Pack.70.528.Net.2.0.pm.part3.rar
rapidshare.com/files/107245451/CN.Pack.70.528.Net.2.0.pm.part4.rar
rapidshare.com/files/107418538/CN.Pack.70.528.Net.2.0.pm.part5.rar
rapidshare.com/files/107202239/CN.Pack.70.528.Net.2.0.pm.part6.rar
Free download:pass4sure Microsoft 70-528
Free download:testking Microsoft 70-528
password:www.certbible.org
High quality IT Certification Training Exam Questions, Study Guides and Practice Tests are in Downloadable PassGuide Testing Engine,Successful for IT Certification or Full Refund for you.Contact Us:Sales@PassGuide.com|
Type |
Exam Bible | New Questions & Answers |
Latest Updated |
Download link |
| All Certbible 's Exam Dumps |
597 |
1 days ago | Available |
PassGuide Training Materials & Practice Tests
About the Author
3 Comments on “Cbt Nuggets Mcts 70-536 70-528”
Write a Comment
Gravatars are small images that can show your personality. You can get your gravatar for free today!


are this links for C# code … ?
Teri ma ki chut.. bhen k lode.. madar chod..
saali file extract to ho gayi par ab chal nahi raha bhen k lode..
Ab kya teri bhen chodu uske saath
Hey, thanks. It’s working fine and absolute perfect.