TS:MS.NET Framework 3.5, ADO.NET Application Development 70-561 Test
Section 70-561(VB)Question: 1You have just graduated from college, now you are serving the internship as the softwaredeveloper in an international company. You have some experience developing Web, Windows, ordistributed applications by using the Microsoft .NET Framework. Now according to the companyrequirement, you use the Microsoft .NET Framework 3.5 and Microsoft ADO.NET to create anapplication. There's a Microsoft SQL Server 2005 database in the company network. Theapplication reads data from the Microsoft SQL Server 2005 database. You generate a storageschema definition for a stored procedure from the database by writing the following codefragment.
The application uses two namespaces respectively named ContosoModel.Store andContosoModel. The ContosoModel.Store namespace contains the storage schem a. TheContosoModel namespace contains the conceptual schema. The conceptual schema has anentity named Supplier. You need to create a function named GetSuppliersInCountry. A list ofSupplier entity instances should be returned by this function. What should you do?
A. Create the following code fragment in the conceptual schema. Create the following code fragment in the mapping schema. B. Create the following code fragment in the conceptual schema. Create the following code fragment in the mapping schema. C. Create the following code fragment in the conceptual schema. Create the following code fragment in the mapping schema. D. Create the following code fragment in the conceptual schema. Create the following code fragment in the mapping schema.
Answer: CQuestion: 2You have just graduated from college, now you are serving the internship as the softwaredeveloper in an international company. You have some experience developing Web, Windows, ordistributed applications by using the Microsoft .NET Framework. Now according to the companyrequirement, you use the Microsoft .NET Framework 3.5 and Microsoft Synchronization Servicesfor Microsoft ADO.NET to create an application. There's a Microsoft SQL Server 2005 databasein the company server. The database is used by the application. There's a table named Leadswhich contains a column named State. The application connects to the table to synchronize data.You write the following code segment.
Dim cn As New SqlConnection("SERVER=myServer;DATABASE=CRMDb;")Dim bldr As New SqlSyncAdapterBuilder(cn)
Now you must make sure that the application partitions the data horizontally. Which codesegment should you add?
A. bldr.TombstoneDataColumns.Add("State")B. bldr.CreationTrackingColumn = "State"C. bldr.TombstoneFilterClause = "STATE=@STATE"bldr.TombstoneFilterParameters.Add(New _ SqlParameter("@STATE", userState))D. bldr.FilterClause = "STATE=@STATE"bldr.FilterParameters.Add( _ New SqlParameter("@STATE", userState))
Answer: D
Question: 3You have just graduated from college, now you are serving the internship as the softwaredeveloper in an international company. You have some experience developing Web, Windows, ordistributed applications by using the Microsoft .NET Framework. Now according to the companyrequirement, you use the Microsoft .NET Framework 3.5 and Microsoft ADO.NET to create anapplication. There is a SqlDataAdapter object named daBill in the application. TheSelectCommand property of the daBill object is set. You write the following code segment. (Linenumbers are used for reference only.)
1 Private Sub ModifyDataAdapter()23 End SubYou must make sure that the daBill object can also deal with updates.At line 2, which code segment should be inserted?
A. Dim cb As New SqlCommandBuilder(daBill)cb.SetAllValues = TrueB. Dim cb As New SqlCommandBuilder(daBill)cb.RefreshSchema()C. Dim cb As New SqlCommandBuilder(daBill)cb.RefreshSchema()cb.GetDeleteCommand()cb.GetInsertComma nd )cb.GetUpdateCommaD. Dim cb As New SqlCommandBuilder(daBill)daBill.DeleteCommand = cb.GetDeleteCommand()daBill.InsertCommand = cb.GetInsertCommand()daBill.UpdateCommand = cb.GetUpdateCommand()E. None of the above.
Answer: D
Question: 4You have just graduated from college, now you are serving the internship as the softwaredeveloper in an international company. You have some experience developing Web, Windows, ordistributed applications by using the Microsoft .NET Framework. Now according to the companyrequirement, you use the Microsoft .NET Framework 3.5 and Microsoft ADO.NET to create anapplication. The application reads data from a Microsoft SQL Server 2005 database. There??s atable named User which contains a primary key column. The application adds data to this table.You write the following code segment. (Line numbers are used for reference only.)
1 Private Sub ValidateData(ByVal tbl As DataTable)2 tbl.Columns.Add("IsValid", GetType(Boolean))3 For Each item As DataRow In tbl.Rows4 'Set IsValid to true or false5 Next6 End Sub7 Private Function ChangeData() As DataTable8 Dim adp As New SqlDataAdapter()9 'Setup SqlDataAdapter to get User data10 Dim tblOriginal As New DataTable()11 adp.FillSchema(tblOriginal, SchemaType.Source)12 adp.Fill(tblOriginal)13 'Change User details14 Dim tblNew As DataTable = tblOriginal.GetChanges()15 ValidateData(tblNew)1617 Return tblOriginal18 End Function
You must make sure that a DataTable is returned by the ChangeData method. The DataTableshould include the value in the IsValid column for each row in the User table. At line 16, whichline of code should you insert?
A. tblOriginal.Merge(tblNew, False, _ MissingSchemaAction.Ignore)B. tblOriginal.Merge(tblNew, True, _ MissingSchemaAction.AddWithKey)C. tblOriginal.Merge(tblNew, False, _ MissingSchemaAction.Add)D. tblOriginal.Merge(tblNew, True, _ MissingSchemaAction.[Error])
Answer: C
Question: 5You have just graduated from college, now you are serving the internship as the softwaredeveloper in an international company. You have some experience developing Web, Windows, ordistributed applications by using the Microsoft .NET Framework. Now according to the companyrequirement, you use the Microsoft .NET Framework 3.5 and Microsoft ADO.NET to create anapplication. There's a databse on a server named WiikigoS1. The database is namedWikiigoDB1. The application reads data from this database. You generate three files:
a mapping schema definition file namedWiikigo.msl; a storage schema definition filenamedWiikigo.ssdl; a conceptual schema definition file namedWiikigo.csdl. You modifiy thecontents of theWiikigo.csdl andWiikigo.msl files. From the altered schema definitions, you mustgenetate the .NET Framework entities. In the options below, which command should you use?
A. Edmgen.exe /mode:ViewGeneration /project:Wiikigo /inssdl: Wiikigo.ssdl /incsdl: Wiikigo.csdl /inmsl: Wiikigo.msl /outobjectlayer: WiikigoB. Edmgen.exe /mode:FullGeneration /project: Wiikigo /provider:System.Data.SqlClient /connectionstring:"server=Wiikigo Srv;integrated security=true;database=Wiikigo DB"C. Edmgen.exe /mode:EntityClassGeneration /project: Wiikigo /incsdl: Wiikigo.csdlD. Edmgen.exe /mode:FromSsdlGeneration /project: Wiikigo /inssdl: Wiikigo.ssdl /outcsdl: Wiikigo.csdl
Answer: C
Question: 6You have just graduated from college, now you are serving the internship as the softwaredeveloper in an international company. You have some experience developing Web, Windows, ordistributed applications by using the Microsoft .NET Framework. Now according to the companyrequirement, you use the Microsoft .NET Framework 3.5 and Microsoft ADO.NET to create anapplication. The application reads data from a Microsoft SQL Server 2005 database. According tothe company requirement, you create a DataSet named DS1 which contains two related tables.The two tables are respectively named Clients and Bills. You write the following code segment.(Line numbers are used for reference only.)
01 Protected Sub Page_Load(ByVal sender As Object, _ByVal e As EventArgs)02 Me.ordTblAdap.Fill(Me.DS1.Bills)03 Me.custTblAdap.Fill(Me.DS1.Clients)04 End Sub05 Private Sub custBindNavSaveItem _Click( _ ByVal sender As Object, ByVal e As EventArgs)0708 End Sub
The two tables in DS1 are often updated. Now you must make sure that before the data is savedto the database by application, the application commits all the updates to the two tables At line7,which code segment be inserted?
A.Me.Validate()Me.tableAdapterManager.UpdateAll(Me.DS1)Me.custBindSrc.EndEdit()Me.billBin dsrc.EndEdit()B.Me.Validate()Me.custBindSrc.EndEdit()Me.billBindsrc.EndEdit()Me.tableAdapterManager.Upda teAll(Me.DS1)C. Me.tableAdapterManager.UpdateBill = _ custTblAdap.TableAdapterManager.UpdateBillOption.InsertUpdateDeleteMe.custBindSrc.End Edit()Me.billBindsrc.EndD. Me.tableAdapterManager.UpdateBill = _custTblAdap.TableAdapterManager.UpdateBillOption.UpdateInsertDeleteMe.custBindSrc.EndEdi t()Me.billBindsrc.End
Answer: B
Question: 7You have just graduated from college, now you are serving the internship as the softwaredeveloper in an international company. You have some experience developing Web, Windows, ordistributed applications by using the Microsoft .NET Framework. Now according to the companyrequirement, you use the Microsoft .NET Framework 3.5 and Microsoft ADO.NET to create anapplication. You write the following code segment.
Dim sqlconn As New SqlConnection()...Dim custAdapter As New SqlDataAdapter( _"SELECT CustID, CompanyName FROM Sales.Customer", sqlconn)Dim ordAdapter As New SqlDataAdapter( _"SELECT OrderID, CustomerID, OrderDate FROM " + _
Original Resource :
Visit 70-561 Link : 70-561 Download PDF Link : 70-561
No comments:
Post a Comment