PrepAway - Latest Free Exam Questions & Answers

What should you do to select a class that allows you to transfer the image from SQL Server to the Windows Form

You work as the application developer at Domain.com. Domain.com uses Visual Studio.NET 2005 as its application development platform.
You are developing a .NET Framework 2.0 banking Windows Forms application and are busy working on a function that retrieves the images of cancelled checks and displays them on the from. You currently have access to a method that reads the images from Microsoft SQL server as a series of bytes.
You are required to select a class that allows you to transfer the image from SQL Server to the Windows Forms application whilst your solution reduces the need of a temporary buffers and files
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Use the MemoryStream class.

B.
Use the NetworkStream class.

C.
Use the FileStream class.

D.
Use the BufferedStream class.

Explanation:
With the given scenario objective you should use the MemoryStream class which allows you to read the image data in memory and stream it to a Windows Forms application without creating any temporary buffers or files.
Incorrect Answers:
B: There is no connection established directly to the SQL Server database so using this option is out of the question.
C, D:
The streaming class in question in this option is incorrect because both require the creation of temporary files or buffers.

2 Comments on “What should you do to select a class that allows you to transfer the image from SQL Server to the Windows Form


Leave a Reply