Microsoft
70-516 · Question #55
70-516 Question #55: Real Exam Question with Answer & Explanation
Sign in or unlock 70-516 to reveal the answer and full explanation for question #55. The question stem and answer options stay visible for context.
Question
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application retreives data from Microsoft SQL Server 2008 database named AdventureWorks. The AdventureWorks.dbo.ProductDetails table contains a column names ProductImages that uses a varbinary(max) data type. You write the following code segment. (Line numbers are included for reference only.) 01 SqlDataReader reader = command.ExecureReader(--empty phrase here - -); 02 while(reader.Read()) 03 { 04 pubID = reader.GetString(0); 05 stream = new FileStream(...); 06 writer = new BinaryWriter(stream); 07 startIndex = 0; 08 retval = reader.GetBytes(1, startIndex, outByte, 0, bufferSize); 09 while(retval == bufferSize) 10 { 11 ... 12 } 13 writer.Write(outbyte, 0, (int)retval-1); 14 writer.Flush(); 15 writer.Close(); 16 stream.Close(); 17 } You need to ensure that the code supports streaming data from the ProductImages column. Which code segment should you insert at the empty phrase in line 01?
Options
- ACommandBehavior.Default
- BCommandBehavior.KeyInfo
- CCommandBehavior.SingleResult
- DCommandBehavior.SequentialAccess
Unlock 70-516 to see the answer
You've previewed enough free 70-516 questions. Unlock 70-516 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.