PrepAway - Latest Free Exam Questions & Answers

Which code segments should you include in Target 1, Target 2, Target 3, Target 4 and Target 5…?

DRAG DROP
You need to update the GetBook() method to retrieve book data by using ADO.NET. You
have the following code:

Which code segments should you include in Target 1, Target 2, Target 3, Target 4 and
Target 5 to complete the code? (To answer, drag the appropriate code segments to the
correct targets in the answer area. Each code segment may be used once, more than once,
or not at all. You may need to drag the split bar between panes or scroll to view content.)

PrepAway - Latest Free Exam Questions & Answers

Answer:

6 Comments on “Which code segments should you include in Target 1, Target 2, Target 3, Target 4 and Target 5…?

  1. Venkatesh says:

    Target1 = “SELECT id, name FROM Books WHERE id = @id”
    Target4 = Id=reader.GetInt32(reader.GetOrdinal(“id”)) and
    Target5 = reader.GetString(reader.GetOrdinal(“name”))

    Because Id is int data type and not GUID.




    2



    0

Leave a Reply